diff --git a/.gitignore b/.gitignore index 30f15cd1d..5af63cadc 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ .jest-test-results.json .jest-tmp .idea +.claude/ node_modules public lib diff --git a/package.json b/package.json index 26f5caf64..83e030fc1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@netdata/netdata-ui", - "version": "5.5.4", + "version": "5.5.5", "description": "netdata UI kit", "main": "dist/index.js", "module": "dist/es6/index.js", diff --git a/src/components/pill/styled.js b/src/components/pill/styled.js index b68580afb..172284d3e 100644 --- a/src/components/pill/styled.js +++ b/src/components/pill/styled.js @@ -23,6 +23,11 @@ export const MasterCardContainer = styled(Flex).attrs( } ` +const cursorStyle = props => { + if (props.onClick) return `&& { cursor: pointer; }` + return "" +} + export const PillContainer = styled(Flex).attrs( ({ round = true, @@ -41,6 +46,7 @@ export const PillContainer = styled(Flex).attrs( semi, ...rest }) => ({ + ...(onClick && { cursor: "pointer" }), padding: getPillPadding(padding, size, tiny), round: round === false ? 1 : round === true ? 7.5 : round, border: { @@ -48,7 +54,6 @@ export const PillContainer = styled(Flex).attrs( color: borderColor || getPillColor(semi ? "hollow" : "border", flavour), size: "1px", }, - ...(onClick && { cursor: "pointer" }), justifyContent, alignItems, position, @@ -56,4 +61,6 @@ export const PillContainer = styled(Flex).attrs( background: getPillBackground({ background, flavour, hollow, semi }), ...rest, }) -)`` +)` + ${cursorStyle} +`