Commit 35a6fb4a authored by Lyza Danger Gardner's avatar Lyza Danger Gardner Committed by Lyza Gardner

Simplify PublishControlButton styling

Use `classes` to extend, not obliterate, components styles and obviate
the need to use complex mixins.
parent dc99cb1e
......@@ -20,7 +20,7 @@ export default function ButtonPatterns() {
<Library.Example title="Basic usage">
<Library.Demo withSource>
<LabeledButton className="PublishControlButton" variant="primary">
<LabeledButton classes="PublishControlButton" variant="primary">
Publish to My Group
</LabeledButton>
</Library.Demo>
......
......@@ -81,7 +81,8 @@ function AnnotationPublishControl({
<div className="AnnotationPublishControl">
<div className="annotation-publish-button">
<LabeledButton
className="PublishControlButton"
classes="PublishControlButton"
data-testid="publish-control-button"
style={buttonStyle}
onClick={onSave}
disabled={isDisabled}
......
......@@ -78,7 +78,7 @@ describe('AnnotationPublishControl', () => {
});
const getPublishButton = wrapper =>
wrapper.find('LabeledButton.PublishControlButton');
wrapper.find('LabeledButton[data-testid="publish-control-button"]');
describe('theming', () => {
it('should apply theme styles', () => {
......
......@@ -15,14 +15,10 @@
text-decoration: underline;
}
// Disable border-radius on right side so it can align with a button next to it
.PublishControlButton {
@include buttons.LabeledButton {
// Border-radius turned off
&--primary {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
}
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
// This button style has asymmetrical padding. Hold it here to see if
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment