Skip to content

Commit

Permalink
Changed default button size
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriellsh committed Jan 7, 2020
1 parent 751e9b2 commit 73952b7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 17 deletions.
21 changes: 11 additions & 10 deletions packages/fuselage/src/components/Button/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,13 @@
text-decoration: none;

@include clickable;
@include use-text-style(c2);
@include use-text-ellipsis;

@include use-text-style(p2);

@include with-rectangular-size(
$height: $sizes-x36,
$padding-x: $spaces-x12,
$height: $sizes-x40,
$padding-x: calc( #{$spaces-x12} ),
$line-height: $text-styles-p2-line-height,
);

Expand All @@ -118,19 +119,19 @@
);
}

&--large {
@include use-text-style(p2);
&--medium {
@include use-text-style(c2);

@include with-rectangular-size(
$height: $sizes-x40,
$padding-x: calc( #{$spaces-x12} ),
$height: $sizes-x36,
$padding-x: $spaces-x12,
$line-height: $text-styles-p2-line-height,
);
}

&--square {
@include with-squared-size(
$size: $spaces-x32,
$size: $spaces-x40,
);
}

Expand All @@ -140,9 +141,9 @@
);
}

&--large-square {
&--medium-square {
@include with-squared-size(
$size: $spaces-x40,
$size: $spaces-x32,
);
}

Expand Down
6 changes: 3 additions & 3 deletions packages/fuselage/src/components/Button2/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const Button2 = forwardRef(function Button2({
is = 'button',
rel,
small,
large,
medium,
square,
...props
}, ref) {
Expand All @@ -27,10 +27,10 @@ export const Button2 = forwardRef(function Button2({
is={is}
ref={ref}
mod-small={small}
mod-large={large}
mod-medium={medium}
mod-square={square}
mod-small-square={small && square}
mod-large-square={large && square}
mod-medium-square={medium && square}
{...extraProps}
{...props}
/>;
Expand Down
8 changes: 4 additions & 4 deletions packages/fuselage/src/components/Button2/stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ Indicates an actionable user action.
}}
yAxis={{
small: { small: true },
default: {},
large: { large: true },
medium: { medium: true },
default: { },
}}
/>
</Story>
Expand Down Expand Up @@ -174,8 +174,8 @@ Indicates an actionable user action.
common={{ onClick: action('click') }}
xAxis={{
text: { children: 'Button' },
'square + icon': { square: true, children: <Icon name='circled-arrow-down' size='x8' /> },
'text + icon': { children: <><Icon name='circled-arrow-down' size='x8' /> Button</> },
'square + icon': { square: true, children: <Icon name='circled-arrow-down' size='x20' /> },
'text + icon': { children: <><Icon name='circled-arrow-down' size='x16' /> Button</> },
}}
yAxis={{
default: {},
Expand Down

0 comments on commit 73952b7

Please sign in to comment.