Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"packageName": "@uifabric/experiments",
"comment": "Shimmer: adding two more examples as per designers request.",
"type": "patch"
}
],
"packageName": "@uifabric/experiments",
"email": "v-vibr@microsoft.com"
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import * as React from 'react';
import {
Shimmer,
getRenderedElements,
ShimmerElementType as ElemType,
ShimmerElementVerticalAlign as ElemVerticalAlign
} from 'experiments/lib/Shimmer';
import './Shimmer.Example.scss';

export class ShimmerBasicExample extends React.Component<{}, {}> {

Expand Down Expand Up @@ -76,6 +78,59 @@ export class ShimmerBasicExample extends React.Component<{}, {}> {
{ type: ElemType.line, height: 10, verticalAlign: ElemVerticalAlign.bottom }
] }
/>
Split line examples.
<div className='shimmerBasicExample-wrapper'>
<Shimmer
isBaseStyle={ true }
>
{ getRenderedElements([
{ type: ElemType.line, widthInPixel: 40, height: 40 },
{ type: ElemType.gap, widthInPixel: 10, height: 40 }
], 40) }
<div
// tslint:disable-next-line:jsx-ban-props
style={
{
display: 'flex',
flexWrap: 'wrap',
width: '300px'
}
}
>
{ getRenderedElements([
{ type: ElemType.line, widthInPixel: 300, height: 10 },
{ type: ElemType.line, widthInPixel: 200, height: 10 },
{ type: ElemType.gap, widthInPixel: 100, height: 20 }
], 20) }
</div>
</Shimmer>
</div>
<div className='shimmerBasicExample-wrapper'>
<Shimmer
isBaseStyle={ true }
>
{ getRenderedElements([
{ type: ElemType.circle, height: 40 },
{ type: ElemType.gap, widthInPixel: 10, height: 40 }
], 40) }
<div
// tslint:disable-next-line:jsx-ban-props
style={
{
display: 'flex',
flexWrap: 'wrap',
width: '500px'
}
}
>
{ getRenderedElements([
{ type: ElemType.line, widthInPixel: 400, height: 10 },
{ type: ElemType.gap, widthInPixel: 100, height: 20 },
{ type: ElemType.line, widthInPixel: 500, height: 10 }
], 20) }
</div>
</Shimmer>
</div>
</div>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@
margin-right: 30px;
}
}

.shimmerBasicExample-wrapper {
margin: 10px;
}
}