Skip to content

Commit

Permalink
update text transition
Browse files Browse the repository at this point in the history
  • Loading branch information
severinlandolt committed Oct 25, 2023
1 parent 9c5bedf commit 02927ba
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/input-elements/BaseInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const BaseInput = React.forwardRef<HTMLInputElement, BaseInputProps>((props, ref
className={tremorTwMerge(
makeInputClassName("root"),
// common
"relative w-full flex items-center min-w-[10rem] outline-none rounded-tremor-default",
"relative w-full flex items-center min-w-[10rem] outline-none rounded-tremor-default transition duration-100",
// light
"shadow-tremor-input",
// dark
Expand All @@ -72,7 +72,7 @@ const BaseInput = React.forwardRef<HTMLInputElement, BaseInputProps>((props, ref
isFocused &&
tremorTwMerge(
// common
"ring-2 transition duration-100",
"ring-2",
// light
"border-tremor-brand-subtle ring-tremor-brand-muted",
// light
Expand Down Expand Up @@ -117,7 +117,7 @@ const BaseInput = React.forwardRef<HTMLInputElement, BaseInputProps>((props, ref
className={tremorTwMerge(
makeInputClassName("input"),
// common
"w-full focus:outline-none focus:ring-0 border-none bg-transparent text-tremor-default rounded-tremor-default",
"w-full focus:outline-none focus:ring-0 border-none bg-transparent text-tremor-default rounded-tremor-default transition duration-100",
// light
"text-tremor-content-emphasis",
// dark
Expand Down
49 changes: 49 additions & 0 deletions src/stories/general/Transition.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import React from "react";

import type { Meta, StoryObj } from "@storybook/react";

import {
DatePicker,
DateRangePicker,
MultiSelect,
MultiSelectItem,
NumberInput,
SearchSelect,
SearchSelectItem,
Select,
SelectItem,
TextInput,
} from "components";

const meta: Meta<typeof DatePicker> = {
title: "General",
};

export default meta;
type Story = StoryObj<typeof DatePicker>;

// Stories
export const Transition: Story = {
render: () => {
return (
<div className="space-y-4 max-w-sm">
<DatePicker />
<DateRangePicker />
<Select>
<SelectItem value="1">Item 1</SelectItem>
<SelectItem value="2">Item 2</SelectItem>
</Select>
<SearchSelect>
<SearchSelectItem value="1">Item 1</SearchSelectItem>
<SearchSelectItem value="2">Item 2</SearchSelectItem>
</SearchSelect>
<MultiSelect>
<MultiSelectItem value="1">Item 1</MultiSelectItem>
<MultiSelectItem value="2">Item 2</MultiSelectItem>
</MultiSelect>
<NumberInput />
<TextInput />
</div>
);
},
};

0 comments on commit 02927ba

Please sign in to comment.