Skip to content

(WIP) Feat/time input #2714

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 21 commits into
base: patch
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
95d70c1
feat: basic component setup index file
ujjwal2608 Dec 30, 2024
7db7704
feat: basic input component setup
ujjwal2608 Dec 30, 2024
935e5c3
feat: added the column and cleaned code
ujjwal2608 Jan 2, 2025
72a9941
fix: fixed the width of the component
ujjwal2608 Jan 2, 2025
10957c7
fix: fixed the typings
ujjwal2608 Jan 2, 2025
c7c4167
feat: basic docs completed
ujjwal2608 Jan 2, 2025
40afdba
feat: docs completed
ujjwal2608 Jan 2, 2025
7a5c8d1
fix: corrected styling
ujjwal2608 Jan 3, 2025
ec55f83
feat: completed the keyboard navigation bw the diff feilds and some f…
ujjwal2608 Jan 3, 2025
9985b7a
fix: corrected the name of Colon coponent in TimeInput
ujjwal2608 Jan 3, 2025
2272ed7
fix: changed the styling of meridiem for invalid state and underlined…
ujjwal2608 Jan 3, 2025
60da66a
fix: changed the styling of meridiem for invalid state and underlined…
ujjwal2608 Jan 3, 2025
ba5952a
fix: done some changes in docs
ujjwal2608 Jan 15, 2025
a0084f5
fix: passed props to the input components in docs
ujjwal2608 Jan 15, 2025
4dde065
Merge branch 'patch' of https://github.com/gluestack/gluestack-ui int…
ujjwal2608 Jan 15, 2025
5a552ec
chore: updated yarn.lock
ujjwal2608 Jan 15, 2025
020befe
chore: updated path and dependencies
ujjwal2608 Jan 15, 2025
d425fd6
fix: fix the isuue of selection of the input feild in the min and hou…
ujjwal2608 Jan 19, 2025
51b025c
fix: fixed the issue of focussing meridiem in the native
ujjwal2608 Jan 19, 2025
0a3fb8b
fix: fixed the time-input width for mobile device
ujjwal2608 Jan 19, 2025
e0760a0
fix: correct the example for the time-input component
ujjwal2608 Jan 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions example/storybook-nativewind/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ module.exports = function (api) {
__dirname,
'../../packages/unstyled/input/src'
),
'@gluestack-ui/time-input': path.resolve(
__dirname,
'../../packages/unstyled/time-input/src'
),
'@gluestack-ui/pin-input': path.resolve(
__dirname,
'../../packages/unstyled/pin-input/src'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import type { ComponentMeta } from '@storybook/react-native';
import TimeInput from './TimeInput';

const TimeInputMeta: ComponentMeta<typeof TimeInput> = {
title: 'stories/TimeInput',
component: TimeInput,
// metaInfo is required for figma generation
// @ts-ignore
metaInfo: {
componentDescription: `The TimeInput component is designed to take the time from user in the form of day.js object`,
},
argTypes: {
size: {
control: 'select',
options: ['sm', 'md', 'lg', 'xl'],
},
variant: {
control: 'select',
options: ['outlined', 'underlined'],
},
isInvalid: {
control: 'boolean',
options: [true, false],
},
isDisabled: {
control: 'boolean',
options: [true, false],
},
isReadOnly: {
control: 'boolean',
options: [true, false],
},
},
args: {
size: 'sm',
variant: 'outlined',
isInvalid: false,
isDisabled: false,
isReadOnly: false,
},
};

export default TimeInputMeta;

export { TimeInput };
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import React, { useState } from 'react';
import {
TimeInput,
TimeInputHr,
TimeInputMin,
TimeInputMeridiem,
TimeInputMeridiemText,
TimeInputColon,
} from '@/components/ui/time-input';

const TimeInputBasic = ({ ...props }: any) => {
const [timeValue, setTimeValue] = useState(null);
return (
<>
<TimeInput
{...props}
value={timeValue}
onChange={setTimeValue}
isHovered={true}
>
<TimeInputHr placeholder="HH" />
<TimeInputColon />
<TimeInputMin placeholder="MM" />
<TimeInputMeridiem>
<TimeInputMeridiemText />
</TimeInputMeridiem>
</TimeInput>
</>
);
};

TimeInputBasic.description =
'This is a basic TimeInput component example. TimeInputs are used to get time input from the user.';

export default TimeInputBasic;
export { TimeInput };
Loading