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

Commit

Permalink
Merge pull request #111 from strapi/develop
Browse files Browse the repository at this point in the history
3.0.3
  • Loading branch information
soupette authored Apr 3, 2020
2 parents f3dfe38 + 7ef4e02 commit af3367c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 20 deletions.
10 changes: 10 additions & 0 deletions docs/stories/components/Button.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,16 @@ function Example() {
Text
</Button>
</div>
<div className="btn-wrapper">
<Button
type="submit"
color="delete"
icon={<FontAwesomeIcon icon={faBaseballBall} />}
disabled
>
Disabled
</Button>
</div>
</section>
</>
</Presentation>
Expand Down
2 changes: 1 addition & 1 deletion packages/buffetjs-hooks/src/useIsMounted/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useRef, useEffect } from 'react';
// Hook taken from https://github.com/hupe1980/react-is-mounted-hook

function useIsMounted() {
const ref = useRef(false);
const ref = useRef(true);

useEffect(() => {
ref.current = true;
Expand Down
2 changes: 1 addition & 1 deletion packages/buffetjs-styles/src/assets/styles/colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const colors = {
backgroundColor: '#6DBB1A',
},
disabled: {
borderColor: '#B4B6BA',
borderColor: '#E9EAEB',
color: '#B4B6BA',
backgroundColor: '#E9EAEB',
},
Expand Down
25 changes: 7 additions & 18 deletions packages/buffetjs-styles/src/components/Button/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,6 @@ const Button = styled.button`
vertical-align: initial;
}
${({ disabled }) =>
disabled &&
`
&:hover {
box-shadow: none;
cursor: initial;
}
`}
// Specific style
${({ color }) =>
color !== 'none' &&
Expand All @@ -60,15 +50,15 @@ const Button = styled.button`
color: ${colors.button[color].color};
`}
${({ color, disabled }) =>
color !== 'cancel' &&
color !== 'none' &&
${({ disabled }) =>
disabled &&
`
&:disabled {
background-color: ${colors.button.disabled.backgroundColor};
border: 1px solid ${colors.button.disabled.borderColor};
color: ${colors.button.disabled.color};
background-color: ${colors.button.disabled.backgroundColor};
border: 1px solid ${colors.button.disabled.borderColor};
color: ${colors.button.disabled.color};
&:hover {
box-shadow: none;
cursor: initial;
}
`}
Expand All @@ -84,7 +74,6 @@ const Button = styled.button`
`
min-width: ${sizes.button.minWidth.small};
`}
`;

Button.defaultProps = {
Expand Down

0 comments on commit af3367c

Please sign in to comment.