-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added documentation for
Divider
component (#2225)
- Loading branch information
Showing
6 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
title: Divider | ||
description: A divider can be used to separate a layout into different sections of content or element. | ||
group: utilities | ||
thumbnail: #TODO | ||
--- | ||
|
||
<p>{frontmatter.description}</p> | ||
|
||
<LiveExample src='Divider.main.jsx' truncate={false}> | ||
<AllExamples.DividerMainExample client:load /> | ||
</LiveExample> | ||
|
||
## Vertical | ||
|
||
The `Divider` component is displayed horizontally by default. To display it vertically, use the `orientation` prop. | ||
|
||
<LiveExample src='Divider.vertical.jsx' truncate={false}> | ||
<AllExamples.DividerVerticalExample client:load /> | ||
</LiveExample> | ||
|
||
## Props | ||
|
||
<PropsTable path='@itwin/itwinui-react/esm/core/Divider/Divider.d.ts' /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.demo-container { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
gap: 0.5rem; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Bentley Systems, Incorporated. All rights reserved. | ||
* See LICENSE.md in the project root for license terms and full copyright notice. | ||
*--------------------------------------------------------------------------------------------*/ | ||
import * as React from 'react'; | ||
import { Divider, Text } from '@itwin/itwinui-react'; | ||
|
||
export default () => { | ||
return ( | ||
<div className='demo-container'> | ||
<Text variant='subheading'>Section 1</Text> | ||
<Divider /> | ||
<Text variant='subheading'>Section 2</Text> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.demo-container { | ||
display: flex; | ||
flex-direction: row; | ||
gap: 1rem; | ||
align-items: center; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Bentley Systems, Incorporated. All rights reserved. | ||
* See LICENSE.md in the project root for license terms and full copyright notice. | ||
*--------------------------------------------------------------------------------------------*/ | ||
import * as React from 'react'; | ||
import { Divider, Text } from '@itwin/itwinui-react'; | ||
|
||
export default () => { | ||
return ( | ||
<div className='demo-container'> | ||
<Text variant='subheading'>Section 1</Text> | ||
<Divider orientation='vertical' /> | ||
<Text variant='subheading'>Section 2</Text> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters