Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PLAY-344]- Add XXS Spacing Token #2098

Merged
merged 1 commit into from
Sep 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
import Example from '../Templates/Example'
import SpacingProps from '../Templates/SpacingProps'

const PROPVALUES = ['none', 'xs', 'sm', 'md', 'lg', 'xl']
const PROPVALUES = ['none', 'xxs', 'xs', 'sm', 'md', 'lg', 'xl']
const PROPNAMES = [
'margin',
'marginLeft',
Expand All @@ -30,11 +30,12 @@ const PROPNAMES = [
'paddingY' ]

const TOKENS = {
'Extra Small': 'space_xs',
'XX Small': 'space_xxs',
'X Small': 'space_xs',
'Small': 'space_sm',
'Medium': 'space_md',
'Large': 'space_lg',
'Extra Large': 'space_xl',
'X Large': 'space_xl',
jasperfurniss marked this conversation as resolved.
Show resolved Hide resolved
}

const Spacing = ({ example, tokensExample }: {example: string, tokensExample?: string}) => (
Expand All @@ -55,6 +56,7 @@ const Spacing = ({ example, tokensExample }: {example: string, tokensExample?: s
<Flex
key={token}
orientation="column"
align="center"
>
<FlexItem>
<div className="pb--tokens-spacing-token-example">
Expand Down
2 changes: 2 additions & 0 deletions playbook/app/pb_kits/playbook/tokens/_spacing.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
$space_xxs: 4px;
$space_xs: 8px;
$space_sm: 16px;
$space_md: 24px;
$space_lg: 32px;
$space_xl: 40px;
$spaces:(
space_xxs: $space_xxs,
space_xs: $space_xs,
space_sm: $space_sm,
space_md: $space_md,
Expand Down
1 change: 1 addition & 0 deletions playbook/app/pb_kits/playbook/utilities/_spacing.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@import "../tokens/spacing";

$space_classes: (
xxs: $space_xxs,
xs: $space_xs,
sm: $space_sm,
md: $space_md,
Expand Down
2 changes: 1 addition & 1 deletion playbook/lib/playbook/spacing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def spacing_options
end

def spacing_values
%w[none xs sm md lg xl]
%w[none xxs xs sm md lg xl]
end

def spacing_props
Expand Down