Skip to content

Commit

Permalink
fix(common): removed description and added padding in HeaderDropdown
Browse files Browse the repository at this point in the history
Ticket: issue/Dashboards-132
Reviewed-by: @MIGUELez11
Refs: #150
  • Loading branch information
fermarinsanchez authored Apr 30, 2024
1 parent 4e93d9e commit 19e49b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/leemons/src/common/HeaderDropdown/HeaderDropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ const HeaderDropdown = ({
const [isOpened, setIsOpened] = useState(false);
const ref = useClickOutside(() => setIsOpened(false));
const [filter, setFilter] = useState('');
const [isOnlyOneItem, setIsOnlyOneItem] = useState(false);
const [selectedItem, setSelectedItem] = useState(
data.find((item) => item?.id === value?.id) || data[0] || {},
);

const isOnlyOneItem = data.length === 1;
React.useEffect(() => {
setIsOnlyOneItem(data.length === 1);
}, [data]);

const { classes, cx } = HeaderDropdownStyles(
{
Expand Down Expand Up @@ -98,7 +100,7 @@ const HeaderDropdown = ({
{item?.label}
</Text>
</TextClamp>
{item?.description ? (
{/* {item?.description ? (
<TextClamp lines={1} maxLines={1}>
<Text
className={classes.itemComponentDescription}
Expand All @@ -109,7 +111,7 @@ const HeaderDropdown = ({
{item?.description}
</Text>
</TextClamp>
) : null}
) : null} */}
</Box>
</Box>
<Box className={classes.itemComponentIcon}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ const HeaderDropdownStyles = createStyles(
itemComponentIcon: {
color: theme.other.global.content.color.positive.default,
fontSize: 14,
marginLeft: 24,
},
itemComponentLabel: {
fontFamily: 'Albert Sans',
Expand Down

0 comments on commit 19e49b2

Please sign in to comment.