Skip to content

Commit efbb2bd

Browse files
committed
docs(layout): add api page and (very) basic example usage
1 parent 6ce7541 commit efbb2bd

File tree

3 files changed

+37
-1
lines changed

3 files changed

+37
-1
lines changed

www/src/components/SideNav.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ const gettingStarted = [
107107
'support',
108108
];
109109

110-
const layout = ['grid'];
110+
const layout = ['box', 'grid'];
111111

112112
const components = [
113113
'alerts',

www/src/examples/Box/Basic.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<Box displayFlex flexDirectionRowReverse>
2+
<Box>Flex item 1</Box>
3+
<Box>Flex item 2</Box>
4+
<Box>Flex item 3</Box>
5+
</Box>;

www/src/pages/layout/box.mdx

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import { graphql } from 'gatsby';
2+
3+
import ComponentApi from '../../components/ComponentApi';
4+
import ReactPlayground from '../../components/ReactPlayground';
5+
import Basic from '../../examples/Box/Basic';
6+
7+
# Box
8+
9+
<p className="lead">
10+
The Box component is a utility component specifically designed to be compatible
11+
with all bootstrap utility classes, allowing you to handle everything you'll need
12+
through React Bootstrap's API.
13+
</p>
14+
15+
## Examples
16+
17+
## Basic Examples
18+
19+
<ReactPlayground codeText={Basic} />
20+
21+
## API
22+
23+
<ComponentApi metadata={props.data.Box} />
24+
25+
export const query = graphql`
26+
query BoxQuery {
27+
Box: componentMetadata(displayName: { eq: "Box" }) {
28+
...ComponentApi_metadata
29+
}
30+
}
31+
`;

0 commit comments

Comments
 (0)