Skip to content

Commit

Permalink
fix: multiple select label color (#832)
Browse files Browse the repository at this point in the history
* Refactor css styles into styled modules

* Extract all components to separate file

* Fix select label wrong color

* chore: change label text

---------

Co-authored-by: ArkadiK94 <[email protected]>
  • Loading branch information
Tamir198 and ArkadiK94 authored Jun 5, 2024
1 parent 76cd9a3 commit 3ced7cf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/components/Common/MultipleSelect/MultipleSelect.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from "react";
import { Option, Select, SelectContainer } from "./MultipleSelectElements";
import styled from "styled-components";

/*
optionsValuesWithLabels=[
Expand All @@ -19,7 +20,7 @@ const MultipleSelect = ({ selectLabel, selectedValue, onValueSelect, optionsValu
});
return (
<SelectContainer>
{selectLabel && <label htmlFor="Select">{selectLabel}:</label>}
{selectLabel && <StyledLabel htmlFor="Select">{selectLabel}:</StyledLabel>}
<Select
name={selectLabel.toLowerCase()}
value={defaultValue || selectedValue}
Expand All @@ -30,4 +31,8 @@ const MultipleSelect = ({ selectLabel, selectedValue, onValueSelect, optionsValu
</SelectContainer>
);
};

const StyledLabel = styled.label`
color: #d7d7d7;
`;
export default MultipleSelect;
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const Template = ({ optionsValuesWithLabels, ...args }) => (

export const Default = Template.bind({});
Default.args = {
selectLabel: "Select an option",
selectLabel: "Label",
selectedValue: "",
defaultValue: "",
optionsValuesWithLabels: [
Expand Down

0 comments on commit 3ced7cf

Please sign in to comment.