Skip to content

Commit

Permalink
Merge pull request #20 from Mario-Duarte/develop
Browse files Browse the repository at this point in the history
Final amends for first release
  • Loading branch information
Mario-Duarte authored Jan 31, 2022
2 parents b7f0fc8 + 2e16206 commit 80e1617
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function App() {
setResultUnit(unit);
}

const converUnits = useMemo(() => {
useMemo(() => {
const converted = useConvertUnits({
defaultSize: defaultSize,
size: convertSize,
Expand Down
4 changes: 2 additions & 2 deletions src/components/InputSize/InputSize.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export function InputSize({
}:InputSizeProps) {

const handleChange = (e:React.ChangeEvent<HTMLInputElement>) => {
const size:number = parseInt(e.target.value); // Parse integer also ensure that there are no leading 0's
onChange(size);
const size:number = +e.target.value; // ensure that there are no leading 0's and that is of number type
onChange(size === 0 ? 1 : size);
}

return(
Expand Down
17 changes: 16 additions & 1 deletion src/components/SampleArea/SampleArea.styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,24 @@ export const TextArea = styled.textarea<TextAreaProps>`
margin-top: 10px;
font-size: ${p => p.fontSize}px;
color: var(--color-main-copy);
overflow: scroll;
overflow-y: scroll;
resize: none;
&::-webkit-scrollbar {
width: 12px; /* width of the entire scrollbar */
}
&::-webkit-scrollbar-track {
background: transparent; /* color of the tracking area */
}
&::-webkit-scrollbar-thumb {
background-color:var(--color-focus); /* color of the scroll thumb */
border-radius: 20px; /* roundness of the scroll thumb */
border: 3px solid transparent; /* creates padding around scroll thumb */
cursor: pointer;
}
&:focus {
outline: none;
}
Expand Down
4 changes: 4 additions & 0 deletions src/styles/SharedStyles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ export const StyledInput = styled.input`
&:focus {
outline: none;
}
&::-webkit-inner-spin-button {
-webkit-appearance: none;
}
`;

export const Label = styled.label`
Expand Down

0 comments on commit 80e1617

Please sign in to comment.