keyValueTable.stories.js 817 B

1234567891011121314151617181920212223242526
  1. import styled from '@emotion/styled';
  2. import {KeyValueTable, KeyValueTableRow} from 'sentry/components/keyValueTable';
  3. const Wrapper = styled('div')`
  4. width: 250px;
  5. `;
  6. export default {
  7. title: 'Components/Tables/KeyValueTable',
  8. component: KeyValueTable,
  9. };
  10. export const Default = () => (
  11. <Wrapper>
  12. <KeyValueTable>
  13. <KeyValueTableRow keyName="Coffee" value="Black hot drink" />
  14. <KeyValueTableRow keyName="Milk" value={<a href="#">White cold drink</a>} />
  15. <KeyValueTableRow keyName="Coffee" value="Black hot drink" />
  16. <KeyValueTableRow keyName="Milk" value="White cold drink" />
  17. <KeyValueTableRow keyName="Coffee" value="Black hot drink" />
  18. <KeyValueTableRow keyName="Milk" value="White cold drink" />
  19. </KeyValueTable>
  20. </Wrapper>
  21. );
  22. Default.storyName = 'default';