|
| 1 | +# @bigcommerce/big-design-patterns |
| 2 | + |
| 3 | +## 1.0.0 |
| 4 | + |
| 5 | +### Major Changes |
| 6 | + |
| 7 | +- cc19989: Releases `@bigcommerce/big-design-pattern`, a collections of useful patterns for BigDesign. |
| 8 | + |
| 9 | + ### New components: |
| 10 | + |
| 11 | + #### `Header` |
| 12 | + |
| 13 | + A header component that can be used to display a title, description, and actions. |
| 14 | + |
| 15 | + ```tsx |
| 16 | + import { Text, Link } from '@bigcommerce/big-design'; |
| 17 | + import { AddIcon. ArrowDropDownIcon } from '@bigcommerce/big-design-icons'; |
| 18 | + import { Header } from '@bigcommerce/big-design-patterns'; |
| 19 | + |
| 20 | + export const Component = () => { |
| 21 | + return ( |
| 22 | + <Header |
| 23 | + actions={[ |
| 24 | + { |
| 25 | + text: 'Main action', |
| 26 | + variant: 'primary', |
| 27 | + iconLeft: <AddIcon />, |
| 28 | + }, |
| 29 | + { |
| 30 | + items: [], |
| 31 | + toggle: { |
| 32 | + text: 'Secondary', |
| 33 | + variant: 'secondary', |
| 34 | + iconRight: <ArrowDropDownIcon />, |
| 35 | + }, |
| 36 | + }, |
| 37 | + ]} |
| 38 | + backLink={{ |
| 39 | + text: 'Back link', |
| 40 | + href: '#', |
| 41 | + onClick: () => { |
| 42 | + window.alert('Back button clicked'); |
| 43 | + }, |
| 44 | + }} |
| 45 | + badge={{ |
| 46 | + variant: 'primary', |
| 47 | + label: 'Beta', |
| 48 | + }} |
| 49 | + description={ |
| 50 | + <Text> |
| 51 | + Main description of the page. It provides a comprehensive overview, accurately capturing |
| 52 | + the essence of the topic in a concise manner.{' '} |
| 53 | + <Link external={true} href="#" target="_blank"> |
| 54 | + Learn more |
| 55 | + </Link> |
| 56 | + </Text> |
| 57 | + } |
| 58 | + icon={<img alt="" height={40} src="logo.svg" width={40} />} |
| 59 | + title="Page Title" |
| 60 | + /> |
| 61 | + ); |
| 62 | + }; |
| 63 | + ``` |
| 64 | + |
| 65 | + #### `Page` |
| 66 | + |
| 67 | + A page component that can be used to display a header and main content. |
| 68 | + |
| 69 | + ```tsx |
| 70 | + import { Panel } from '@bigcommerce/big-design'; |
| 71 | + import { Page, Header } from '@bigcommerce/big-design-patterns'; |
| 72 | + |
| 73 | + export const Component = () => { |
| 74 | + return ( |
| 75 | + <Page |
| 76 | + background={{ |
| 77 | + src: 'background.jpg', |
| 78 | + }} |
| 79 | + header={<Header {...} />} |
| 80 | + message={{ |
| 81 | + header: 'Optional headline', |
| 82 | + type: 'info', |
| 83 | + messages: [ |
| 84 | + { text: 'Required description copy.', link: { text: 'Optional link', href: '#' } }, |
| 85 | + ], |
| 86 | + }} |
| 87 | + > |
| 88 | + <Panel header="Main content"> |
| 89 | + ... |
| 90 | + </Panel> |
| 91 | + </Page> |
| 92 | + ); |
| 93 | + }; |
| 94 | + ``` |
0 commit comments