Skip to content

Commit 22b0a61

Browse files
authored
Merge pull request #86 from rcpch:active-prop
Active-prop
2 parents afe7f4d + 8d18f14 commit 22b0a61

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@rcpch/digital-growth-charts-react-component-library",
3-
"version": "7.0.0",
3+
"version": "7.0.1",
44
"description": "A React component library for the RCPCH digital growth charts using Rollup, TypeScript and Styled-Components",
55
"main": "build/index.js",
66
"module": "build/esm.index.js",
+10-10
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
import styled from 'styled-components';
22

33
export const StyledErrorButton = styled.button<{
4-
activeColour: string;
5-
inactiveColour: string;
4+
$activeColour: string;
5+
$inactiveColour: string;
66
fontFamily: string;
77
fontSize: number;
88
fontWeight: string;
99
fontStyle: string;
1010
color: string;
11-
enabled: boolean;
12-
margin?: string;
11+
$enabled: boolean;
12+
$margin?: string;
1313
}>`
1414
align-self: flex-end;
15-
background-color: ${({inactiveColour, activeColour, enabled }) => (enabled ? activeColour : inactiveColour)};
16-
border: 2px solid ${({enabled, activeColour, inactiveColour}) => (enabled ? activeColour : inactiveColour)};
15+
background-color: ${({$inactiveColour, $activeColour, $enabled }) => ($enabled ? $activeColour : $inactiveColour)};
16+
border: 2px solid ${({$enabled, $activeColour, $inactiveColour}) => ($enabled ? $activeColour : $inactiveColour)};
1717
font-family: Arial;
1818
font-size: 14px;
1919
min-height: 30px;
@@ -23,12 +23,12 @@ export const StyledErrorButton = styled.button<{
2323
font-style: ${({ fontStyle }) => fontStyle};
2424
color: ${({ color }) => color};
2525
&:hover {
26-
background-color: ${({enabled, activeColour, inactiveColour}) => (enabled ? activeColour : inactiveColour)};
26+
background-color: ${({$enabled, $activeColour, $inactiveColour}) => ($enabled ? $activeColour : $inactiveColour)};
2727
color: ${({ color }) => color};
28-
border: 2px solid ${({enabled, inactiveColour, activeColour}) => (enabled ? activeColour : inactiveColour)};
29-
outline: ${({enabled, activeColour}) => (enabled ? activeColour : 'transparent')} solid 2px;
28+
border: 2px solid ${({$enabled, $inactiveColour, $activeColour}) => ($enabled ? $activeColour : $inactiveColour)};
29+
outline: ${({$enabled, $activeColour}) => ($enabled ? $activeColour : 'transparent')} solid 2px;
3030
}
3131
&:focus {
32-
outline: ${(props) => (props.enabled ? props.activeColour : 'transparent')} solid 2px;
32+
outline: ${(props) => (props.$enabled ? props.$activeColour : 'transparent')} solid 2px;
3333
}
3434
`;

0 commit comments

Comments
 (0)