-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new variant added with subtle styles
- Loading branch information
1 parent
9ce2b09
commit 95c6b9a
Showing
10 changed files
with
195 additions
and
5 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
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
9 changes: 9 additions & 0 deletions
9
playbook/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_separators_hidden.html.erb
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,9 @@ | ||
<% | ||
options = [ | ||
{ label: 'United States', value: 'United States', id: 'us' }, | ||
{ label: 'Canada', value: 'Canada', id: 'ca' }, | ||
{ label: 'Pakistan', value: 'Pakistan', id: 'pk' }, | ||
] | ||
|
||
%> | ||
<%= pb_rails("dropdown", props: {options: options, separators: false}) %> |
33 changes: 33 additions & 0 deletions
33
playbook/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_separators_hidden.jsx
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,33 @@ | ||
import React from 'react' | ||
import { Dropdown } from 'playbook-ui' | ||
|
||
const DropdownSeparatorsHidden = (props) => { | ||
|
||
const options = [ | ||
{ | ||
label: "United States", | ||
value: "United States", | ||
}, | ||
{ | ||
label: "Canada", | ||
value: "Canada", | ||
}, | ||
{ | ||
label: "Pakistan", | ||
value: "Pakistan", | ||
} | ||
]; | ||
|
||
|
||
return ( | ||
<div> | ||
<Dropdown | ||
options={options} | ||
separators={false} | ||
{...props} | ||
/> | ||
</div> | ||
) | ||
} | ||
|
||
export default DropdownSeparatorsHidden |
10 changes: 10 additions & 0 deletions
10
playbook/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.html.erb
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,10 @@ | ||
<% | ||
options = [ | ||
{ label: 'United States', value: 'United States', id: 'us' }, | ||
{ label: 'Canada', value: 'Canada', id: 'ca' }, | ||
{ label: 'Pakistan', value: 'Pakistan', id: 'pk' }, | ||
] | ||
|
||
%> | ||
|
||
<%= pb_rails("dropdown", props: { options: options, variant: "subtle", separators: false }) %> |
34 changes: 34 additions & 0 deletions
34
playbook/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.jsx
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,34 @@ | ||
import React from 'react' | ||
import { Dropdown } from 'playbook-ui' | ||
|
||
const DropdownSubtleVariant = (props) => { | ||
|
||
const options = [ | ||
{ | ||
label: "United States", | ||
value: "United States", | ||
}, | ||
{ | ||
label: "Canada", | ||
value: "Canada", | ||
}, | ||
{ | ||
label: "Pakistan", | ||
value: "Pakistan", | ||
} | ||
]; | ||
|
||
|
||
return ( | ||
<> | ||
<Dropdown | ||
options={options} | ||
separators={false} | ||
variant="subtle" | ||
{...props} | ||
/> | ||
</> | ||
) | ||
} | ||
|
||
export default DropdownSubtleVariant |
1 change: 1 addition & 0 deletions
1
playbook/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.md
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 @@ | ||
For the `subtle` variant, it is recommended that you set the `Separators` prop to `false` to remove the separator lines between the options for a more cleaner look. |
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
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
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