Skip to content

Commit e67f287

Browse files
committed
Minor additions.
1 parent 198244c commit e67f287

4 files changed

Lines changed: 13 additions & 12 deletions

File tree

src/components/checkbox/checkbox.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export const Checkbox = forwardRef(
2424
indeterminate,
2525
Label,
2626
label,
27+
labelProps,
2728
labelPosition,
2829
margin,
2930
...props
@@ -45,6 +46,7 @@ export const Checkbox = forwardRef(
4546
data-testid={testId}
4647
disabled={disabled}
4748
margin={margin}
49+
{...labelProps}
4850
>
4951
{label && labelPosition === "left" && (
5052
<LabelText as={Label} disabled={disabled} left>

src/components/checkbox/styled.js

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
import styled from "styled-components"
22
import { Icon } from "src/components/icon"
33
import Box from "src/components/templates/box"
4-
import { getSizeUnit, getValidatedControlColor } from "src/theme/utils"
5-
import margin from "src/mixins/margin"
6-
import alignSelf from "src/mixins/alignSelf"
7-
84
import Flex from "src/components/templates/flex"
5+
import { getSizeUnit, getValidatedControlColor } from "src/theme/utils"
96

107
export const CheckboxContainer = styled(Box).attrs({
118
height: "16px",
@@ -49,14 +46,13 @@ export const StyledCheckbox = styled(Flex)`
4946
}};
5047
`
5148

52-
export const StyledLabel = styled.label`
53-
${margin}
54-
${alignSelf}
55-
position: relative;
49+
export const StyledLabel = styled(Flex).attrs(props => ({
50+
as: "label",
51+
position: "relative",
52+
alignItems: "center",
53+
...props,
54+
}))`
5655
cursor: ${({ disabled }) => (disabled ? "auto" : "pointer")};
57-
display: flex;
58-
flex-flow: row nowrap;
59-
align-items: center;
6056
`
6157

6258
export const LabelText = styled.span`

src/components/tableV2/netdataTable.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
//TODO refactor bulk action and row action to single function to decrease repeatability
21
import React, { useCallback, useEffect, useRef, useState } from "react"
32
import {
43
getCoreRowModel,

src/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ export { default as Tooltip } from "./components/drops/tooltip"
7676
export { default as Popover } from "./components/drops/popover"
7777
export { default as Menu } from "./components/drops/menu"
7878
export { default as MenuDropdown } from "./components/drops/menu/dropdown"
79+
export {
80+
default as MenuDropdownItem,
81+
ItemContainer as MenuItemContainer,
82+
} from "./components/drops/menu/dropdownItem"
7983
export { default as MenuButton } from "./components/drops/menu/menuButton"
8084

8185
export { default as Flex } from "./components/templates/flex"

0 commit comments

Comments
 (0)