Skip to content
This repository was archived by the owner on Mar 8, 2023. It is now read-only.

Commit af3367c

Browse files
authored
Merge pull request #111 from strapi/develop
3.0.3
2 parents f3dfe38 + 7ef4e02 commit af3367c

File tree

4 files changed

+19
-20
lines changed

4 files changed

+19
-20
lines changed

docs/stories/components/Button.stories.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,16 @@ function Example() {
113113
Text
114114
</Button>
115115
</div>
116+
<div className="btn-wrapper">
117+
<Button
118+
type="submit"
119+
color="delete"
120+
icon={<FontAwesomeIcon icon={faBaseballBall} />}
121+
disabled
122+
>
123+
Disabled
124+
</Button>
125+
</div>
116126
</section>
117127
</>
118128
</Presentation>

packages/buffetjs-hooks/src/useIsMounted/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { useRef, useEffect } from 'react';
33
// Hook taken from https://github.com/hupe1980/react-is-mounted-hook
44

55
function useIsMounted() {
6-
const ref = useRef(false);
6+
const ref = useRef(true);
77

88
useEffect(() => {
99
ref.current = true;

packages/buffetjs-styles/src/assets/styles/colors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ const colors = {
6868
backgroundColor: '#6DBB1A',
6969
},
7070
disabled: {
71-
borderColor: '#B4B6BA',
71+
borderColor: '#E9EAEB',
7272
color: '#B4B6BA',
7373
backgroundColor: '#E9EAEB',
7474
},

packages/buffetjs-styles/src/components/Button/index.js

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,6 @@ const Button = styled.button`
4141
vertical-align: initial;
4242
}
4343
44-
${({ disabled }) =>
45-
disabled &&
46-
`
47-
&:hover {
48-
box-shadow: none;
49-
cursor: initial;
50-
}
51-
`}
52-
53-
5444
// Specific style
5545
${({ color }) =>
5646
color !== 'none' &&
@@ -60,15 +50,15 @@ const Button = styled.button`
6050
color: ${colors.button[color].color};
6151
`}
6252
63-
${({ color, disabled }) =>
64-
color !== 'cancel' &&
65-
color !== 'none' &&
53+
${({ disabled }) =>
6654
disabled &&
6755
`
68-
&:disabled {
69-
background-color: ${colors.button.disabled.backgroundColor};
70-
border: 1px solid ${colors.button.disabled.borderColor};
71-
color: ${colors.button.disabled.color};
56+
background-color: ${colors.button.disabled.backgroundColor};
57+
border: 1px solid ${colors.button.disabled.borderColor};
58+
color: ${colors.button.disabled.color};
59+
&:hover {
60+
box-shadow: none;
61+
cursor: initial;
7262
}
7363
`}
7464
@@ -84,7 +74,6 @@ const Button = styled.button`
8474
`
8575
min-width: ${sizes.button.minWidth.small};
8676
`}
87-
8877
`;
8978

9079
Button.defaultProps = {

0 commit comments

Comments
 (0)