Design system that powers the BigCommerce ecosystem.
OTHER License
Published by chanceaclark almost 5 years ago
Published by chanceaclark almost 5 years ago
Published by deini almost 5 years ago
Note: Version bump only for package @bigcommerce/configs
Published by deini almost 5 years ago
onChange
is renamed to onItemChange
^4.3.0
<Table />
no longer accepts Margin props.Published by deini almost 5 years ago
onChange
is renamed to onItemChange
^4.3.0
<Table />
no longer accepts Margin props.Published by deini almost 5 years ago
Published by deini almost 5 years ago
Published by chanceaclark almost 5 years ago
Note: Version bump only for package @bigcommerce/big-design-theme
Published by chanceaclark almost 5 years ago
Options
and an Action
object. Will call onChange
when option is selected with the chosen value
and option
as arguments. For more details see the usage examples in our docs.Old:
<Select
label="Countries"
maxHeight={300}
onActionClick={() => null}
onItemChange={handleChange}
placeholder={'Choose country'}
placement={'bottom-start'}
required
value={value}
>
<Select.Option value="us">United States</Select.Option>
<Select.Option value="mx">Mexico</Select.Option>
<Select.Option value="ca">Canada</Select.Option>
<Select.Option value="ru" disabled>Russia</Select.Option>
<Select.Action>Action</Select.Action>
</Select>
New:
<Select
action={{
actionType: 'destructive',
content: 'Remove Country',
icon: <DeleteIcon />,
onClick: () => null,
}}
label="Countries"
maxHeight={300}
onChange={handleChange}
options={[
{ value: 'us', content: 'United States' },
{ value: 'mx', content: 'Mexico' },
{ value: 'ca', content: 'Canada' },
{ value: 'ru', content: 'Russia', disabled: true },
]}
placeholder={'Choose country'}
placement={'bottom-start'}
required
value={value}
/>
items
prop to render tab items and omits children from being rendered.Old:
<Tabs>
<Tabs.Tab id="tab1">Tab 1</Tabs.Tab>
{/* ... */}
</Tabs>
New:
<Tabs activeTab="tab1" items={[{ id: 'tab1', title: 'Tab 1' }]} onTabClick={() => {}} />
Table
component no longer exposes Actions, Head, Row, Body, CellDropdownItems
& DropdownItemLinks
as options
.Old:
<Dropdown onItemClick={onClick} trigger={<Button>Button</Button>}>
<Dropdown.Item value={0}>Option</Dropdown.Item>
<Dropdown.Item value={1}>Option</Dropdown.Item>
<Dropdown.Item value={2}>Option</Dropdown.Item>
</Dropdown>
New:
<Dropdown
options={[
{ content: 'Option', value: 0, onClick },
{ content: 'Option', value: 1, onClick },
{ content: 'Option', value: 2, onClick, actionType: 'destructive' },
{ content: 'Option', value: 3, onClick, icon: <CheckCircleIcon /> },
]}
trigger={<Button>Button</Button>}/>
header
and actions
props instead.Old:
<Modal isOpen={isOpen}>
<Modal.Header>Modal Title</Modal.Header>
<Modal.Body>
<Text>Body content.</Text>
</Modal.Body>
<Modal.Actions>
<Button variant="subtle" onClick={() => setIsOpen(false)}>
Cancel
</Button>
</Modal.Actions>
</Modal>
New:
<Modal
actions={[{text: 'Cancel', variant: 'subtle', onClick: () => setIsOpen(false)}]}
isOpen={isOpen}
header="Modal Title">
<Text>Body content.</Text>
</Modal>
Published by chanceaclark almost 5 years ago
Published by chanceaclark almost 5 years ago
Published by chanceaclark almost 5 years ago
Options
and an Action
object. Will call onChange
when option is selected with the chosen value
and option
as arguments. For more details see the usage examples in our docs.Old:
<Select
label="Countries"
maxHeight={300}
onActionClick={() => null}
onItemChange={handleChange}
placeholder={'Choose country'}
placement={'bottom-start'}
required
value={value}
>
<Select.Option value="us">United States</Select.Option>
<Select.Option value="mx">Mexico</Select.Option>
<Select.Option value="ca">Canada</Select.Option>
<Select.Option value="ru" disabled>Russia</Select.Option>
<Select.Action>Action</Select.Action>
</Select>
New:
<Select
action={{
actionType: 'destructive',
content: 'Remove Country',
icon: <DeleteIcon />,
onClick: () => null,
}}
label="Countries"
maxHeight={300}
onChange={handleChange}
options={[
{ value: 'us', content: 'United States' },
{ value: 'mx', content: 'Mexico' },
{ value: 'ca', content: 'Canada' },
{ value: 'ru', content: 'Russia', disabled: true },
]}
placeholder={'Choose country'}
placement={'bottom-start'}
required
value={value}
/>
items
prop to render tab items and omits children from being rendered.Old:
<Tabs>
<Tabs.Tab id="tab1">Tab 1</Tabs.Tab>
{/* ... */}
</Tabs>
New:
<Tabs activeTab="tab1" items={[{ id: 'tab1', title: 'Tab 1' }]} onTabClick={() => {}} />
DropdownItems
& DropdownItemLinks
as options
.Old:
<Dropdown onItemClick={onClick} trigger={<Button>Button</Button>}>
<Dropdown.Item value={0}>Option</Dropdown.Item>
<Dropdown.Item value={1}>Option</Dropdown.Item>
<Dropdown.Item value={2}>Option</Dropdown.Item>
</Dropdown>
New:
<Dropdown
options={[
{ content: 'Option', value: 0, onClick },
{ content: 'Option', value: 1, onClick },
{ content: 'Option', value: 2, onClick, actionType: 'destructive' },
{ content: 'Option', value: 3, onClick, icon: <CheckCircleIcon /> },
]}
trigger={<Button>Button</Button>}/>
header
and actions
props instead.Old:
<Modal isOpen={isOpen}>
<Modal.Header>Modal Title</Modal.Header>
<Modal.Body>
<Text>Body content.</Text>
</Modal.Body>
<Modal.Actions>
<Button variant="subtle" onClick={() => setIsOpen(false)}>
Cancel
</Button>
</Modal.Actions>
</Modal>
New:
<Modal
actions={[{text: 'Cancel', variant: 'subtle', onClick: () => setIsOpen(false)}]}
isOpen={isOpen}
header="Modal Title">
<Text>Body content.</Text>
</Modal>
Published by chanceaclark about 5 years ago
Note: Version bump only for package @bigcommerce/docs
Published by chanceaclark about 5 years ago
Published by chanceaclark about 5 years ago
Published by chanceaclark about 5 years ago
Published by deini about 5 years ago
Published by deini about 5 years ago
Published by deini about 5 years ago