Skip to content

Commit 216390b

Browse files
author
Josh Habdas
committed
Two Segment varation examples
1 parent 3d843d2 commit 216390b

5 files changed

Lines changed: 63 additions & 2 deletions

File tree

docs/app/Examples/elements/Segment/SegmentExamples.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, {Component} from 'react';
22
import SegmentTypesExamples from './Types/SegmentTypesExamples';
33
import SegmentGroupsExamples from './Groups/SegmentGroupsExamples';
44
import SegmentStatesExamples from './States/SegmentStatesExamples';
5-
// import SegmentVariationsExamples from './Variations/SegmentVariationsExamples';
5+
import SegmentVariationsExamples from './Variations/SegmentVariationsExamples';
66

77
export default class SegmentExamples extends Component {
88
render() {
@@ -11,6 +11,7 @@ export default class SegmentExamples extends Component {
1111
<SegmentTypesExamples />
1212
<SegmentGroupsExamples />
1313
<SegmentStatesExamples />
14+
<SegmentVariationsExamples />
1415
</div>
1516
);
1617
}

docs/app/Examples/elements/Segment/States/SegmentLoadingExample.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default class SegmentLoadingExample extends Component {
55
render() {
66
return (
77
<Segment className='loading'>
8-
Pellentesque habitant morbi tristique senectus.
8+
Loading content.
99
</Segment>
1010
);
1111
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import React, {Component} from 'react';
2+
import {Segment, Segments} from 'stardust';
3+
4+
export default class SegmentAttachedExample extends Component {
5+
render() {
6+
return (
7+
<Segments>
8+
<Segment className='top attached'>
9+
This segment is on top
10+
</Segment>
11+
<Segment className='attached'>
12+
This segment is attached on both sides
13+
</Segment>
14+
<Segment className='bottom attached'>
15+
This segment is on bottom
16+
</Segment>
17+
</Segments>
18+
);
19+
}
20+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import React, {Component} from 'react';
2+
import {Segment} from 'stardust';
3+
4+
export default class SegmentInvertedExample extends Component {
5+
render() {
6+
return (
7+
<Segment className='inverted'>
8+
Inverted content.
9+
</Segment>
10+
);
11+
}
12+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import React, {Component} from 'react';
2+
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample';
3+
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection';
4+
import {Message} from 'stardust';
5+
6+
export default class SegmentVariationsExamples extends Component {
7+
render() {
8+
return (
9+
<ExampleSection title='Variations'>
10+
<ComponentExample
11+
title='Inverted'
12+
description='A segment can have its colors inverted for contrast.'
13+
examplePath='elements/Segment/Variations/SegmentInvertedExample'
14+
/>
15+
<ComponentExample
16+
title='Attached'
17+
description='A segment can be attached to other content on a page.'
18+
examplePath='elements/Segment/Variations/SegmentAttachedExample'
19+
>
20+
<Message className='info'>
21+
Attached segments are designed to be used with other <code>attached</code> variations like
22+
the <a href='#Header-Variations-HeaderAttachedExample'>attached header</a> or <i>attached messages</i>.
23+
</Message>
24+
</ComponentExample>
25+
</ExampleSection>
26+
);
27+
}
28+
}

0 commit comments

Comments
 (0)