Skip to content

Commit

Permalink
[components] Remove deprecated kind secondary button (#660)
Browse files Browse the repository at this point in the history
* [components] Linting button styling

* [components] Remove deprecated kind secondary button

* [components] Deprecated secondary button
  • Loading branch information
Kristoffer J. Sivertsen authored and bjoerge committed Mar 15, 2018
1 parent 7e302ea commit 88cf94c
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 27 deletions.
51 changes: 26 additions & 25 deletions packages/@sanity/components/src/buttons/styles/DefaultButton.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@
0 0 10px 5px color(var(--white) a(10%));
}

.content {
display: flex;
align-items: center;
}

.inner {
display: block;
outline: none;
}

.root {
margin: 0;
padding: 0;
Expand Down Expand Up @@ -70,9 +80,18 @@
animation-duration: 0.2s;
}

.inner {
display: block;
outline: none;
.onlyIcon {
@nest & .inner {
padding: 0.7em 0.8em !important;
}

@nest & .content {
display: block;
}

@nest & .icon {
margin-right: 0;
}
}

.padding_default {
Expand All @@ -87,10 +106,6 @@
}
}

.onlyIcon .inner {
padding: 0.7em 0.8em !important;
}

.padding_small {
@nest & .inner {
@nest :not(.onlyIcon) & {
Expand All @@ -103,11 +118,6 @@
}
}

.content {
display: flex;
align-items: center;
}

.shadow {
composes: shadow-1dp from "part:@sanity/base/theme/shadows-style";
}
Expand Down Expand Up @@ -166,6 +176,10 @@
}
}

.secondary {
composes: inverted;
}

.color__primary {
border-color: var(--brand-primary);
background-color: var(--brand-primary);
Expand Down Expand Up @@ -330,24 +344,11 @@
/* empty */
}

.content {
display: inline-block;
vertical-align: middle;
}

.icon {
transform: scale(1.2);
margin-right: var(--small-padding);
}

.onlyIcon .content {
display: block;
}

.onlyIcon .icon {
margin-right: 0;
}

.disabled {
opacity: 0.2;
}
2 changes: 1 addition & 1 deletion packages/@sanity/components/src/dialogs/ConfirmDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default class DefaultDialog extends React.PureComponent {
<Button
onClick={onCancel}
icon={CloseIcon}
kind="secondary"
inverted
>
{cancelButtonText}
</Button>
Expand Down
2 changes: 1 addition & 1 deletion packages/@sanity/desk-tool/src/components/ConfirmDelete.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default enhanceWithReferringDocuments(class ConfirmDelete extends React.P

const actions = [
canContinue && {name: 'confirm', title: hasReferringDocuments ? 'Try to delete anyway' : 'Delete now'},
{name: 'cancel', title: 'Cancel', kind: 'secondary'}
{name: 'cancel', title: 'Cancel', kind: 'simple'}
].filter(Boolean)

const title = isCheckingReferringDocuments ? 'Checking…' : 'Confirm delete'
Expand Down

0 comments on commit 88cf94c

Please sign in to comment.