Skip to content

Commit 4940c97

Browse files
committed
prettify
1 parent 5b68b4b commit 4940c97

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/components/Input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const Input: React.FC = () => {
3737
const getClassName = useCallback(() => {
3838
const border = BORDER_COLOR.focus[primaryColor as keyof typeof BORDER_COLOR.focus];
3939
const ring =
40-
RING_COLOR["second-focus"][primaryColor as keyof typeof RING_COLOR["second-focus"]];
40+
RING_COLOR["second-focus"][primaryColor as keyof (typeof RING_COLOR)["second-focus"]];
4141
const classNameOverload = typeof inputClassName === "string" ? inputClassName : "";
4242
return `relative transition-all duration-300 py-2.5 pl-4 pr-14 w-full border-gray-300 dark:bg-slate-800 dark:text-white/80 dark:border-slate-600 rounded-lg tracking-wide font-light text-sm placeholder-gray-400 bg-white focus:ring disabled:opacity-40 disabled:cursor-not-allowed ${border} ${ring} ${classNameOverload}`;
4343
}, [primaryColor, inputClassName]);

src/components/Shortcuts.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const ItemTemplate = React.memo((props: ItemTemplateProps) => {
2727

2828
// Functions
2929
const getClassName: () => string = useCallback(() => {
30-
const textColor = TEXT_COLOR["600"][primaryColor as keyof typeof TEXT_COLOR["600"]];
30+
const textColor = TEXT_COLOR["600"][primaryColor as keyof (typeof TEXT_COLOR)["600"]];
3131
const textColorHover = TEXT_COLOR.hover[primaryColor as keyof typeof TEXT_COLOR.hover];
3232
return `whitespace-nowrap w-1/2 md:w-1/3 lg:w-auto transition-all duration-300 hover:bg-gray-100 dark:hover:bg-white/10 p-2 rounded cursor-pointer ${textColor} ${textColorHover}`;
3333
}, [primaryColor]);

src/components/utils.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ export const SecondaryButton: React.FC<Button> = ({ children, onClick, disabled
147147
export const PrimaryButton: React.FC<Button> = ({ children, onClick, disabled = false }) => {
148148
// Contexts
149149
const { primaryColor } = useContext(DatepickerContext);
150-
const bgColor = BG_COLOR["500"][primaryColor as keyof typeof BG_COLOR["500"]];
151-
const borderColor = BORDER_COLOR["500"][primaryColor as keyof typeof BORDER_COLOR["500"]];
150+
const bgColor = BG_COLOR["500"][primaryColor as keyof (typeof BG_COLOR)["500"]];
151+
const borderColor = BORDER_COLOR["500"][primaryColor as keyof (typeof BORDER_COLOR)["500"]];
152152
const bgColorHover = BG_COLOR.hover[primaryColor as keyof typeof BG_COLOR.hover];
153153
const ringColor = RING_COLOR.focus[primaryColor as keyof typeof RING_COLOR.focus];
154154

@@ -231,7 +231,7 @@ export const RoundedButton: React.FC<Button> = ({
231231
export const VerticalDash = () => {
232232
// Contexts
233233
const { primaryColor } = useContext(DatepickerContext);
234-
const bgColor = BG_COLOR["500"][primaryColor as keyof typeof BG_COLOR["500"]];
234+
const bgColor = BG_COLOR["500"][primaryColor as keyof (typeof BG_COLOR)["500"]];
235235

236236
return <div className={`bg-blue-500 h-7 w-1 rounded-full hidden md:block ${bgColor}`} />;
237237
};

0 commit comments

Comments
 (0)