Skip to content
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

feat: school, toteBagPlay 아이콘을 추가한다. #955

Merged
merged 14 commits into from
Jun 3, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ exports[`<Spinner /> when Spinner rendered match snapshot 1`] = `
<span
class="emotion-0"
data-testid="spinner"
style="transform: rotate(0deg);"
/>
</div>
`;
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ import { createReactRenderer } from '@vibrant-ui/utils/testing-web';
import { Tab } from '../Tab';
import { TabGroup } from './TabGroup';

jest.mock('@vibrant-ui/core', () => ({
...jest.requireActual('@vibrant-ui/core'),
useResponsiveValue: jest.fn().mockReturnValue({ breakpointIndex: 2 }),
}));

describe('<TabGroup />', () => {
const { render } = createReactRenderer();

Expand Down
13 changes: 10 additions & 3 deletions packages/vibrant-core/src/lib/TextInput/TextInput.native.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { forwardRef, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
import type { KeyboardTypeOptions, TextInputProps as RNTextInputProps } from 'react-native';
import type {
KeyboardTypeOptions,
NativeSyntheticEvent,
TextInputProps as RNTextInputProps,
TextInputKeyPressEventData,
} from 'react-native';
import { TextInput as RNTextInput, StyleSheet } from 'react-native';
import styled from '@emotion/native';
import { createShouldForwardProp } from '../createShouldForwardProp';
Expand Down Expand Up @@ -110,8 +115,10 @@ export const TextInput = forwardRef<TextInputRef, TextInputProps>(

onBlur?.();
}}
onKeyPress={event => onKeyPress?.({ key: event.nativeEvent.key, prevent: () => event.preventDefault() })}
onChangeText={value => {
onKeyPress={(event: NativeSyntheticEvent<TextInputKeyPressEventData>) =>
onKeyPress?.({ key: event.nativeEvent.key, prevent: () => event.preventDefault() })
}
onChangeText={(value: string) => {
const replacedValue = replaceValue({ pattern, value });

let isPrevented = false;
Expand Down
5 changes: 3 additions & 2 deletions packages/vibrant-core/src/lib/TextInput/TextInput.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { forwardRef, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
import type { FormEvent, KeyboardEvent } from 'react';
import styled from '@emotion/styled';
import { createShouldForwardProp } from '../createShouldForwardProp';
import type { SystemProps, TextInputProps, TextInputRef } from './TextInputProps';
Expand Down Expand Up @@ -97,7 +98,7 @@ export const TextInput = forwardRef<TextInputRef, TextInputProps>(

onBlur?.();
}}
onKeyDown={event => {
onKeyDown={(event: KeyboardEvent<HTMLInputElement>) => {
const { key } = event.nativeEvent;

if (key === 'Enter') {
Expand All @@ -108,7 +109,7 @@ export const TextInput = forwardRef<TextInputRef, TextInputProps>(

onKeyPress?.({ key, prevent: () => event.preventDefault() });
}}
onInput={event => {
onInput={(event: FormEvent<HTMLInputElement>) => {
const replacedValue = replaceValue({
pattern: type === 'number' ? /\d/ : pattern,
value: event.currentTarget.value,
Expand Down
1 change: 1 addition & 0 deletions packages/vibrant-icons/assets/icons/School/Fill.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/vibrant-icons/assets/icons/School/Regular.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/vibrant-icons/assets/icons/School/Thin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/vibrant-icons/assets/icons/ToteBagPlay/Fill.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/vibrant-icons/assets/icons/ToteBagPlay/Thin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading