beautify imports/exports after 4549448
This commit is contained in:
parent
45494483a0
commit
1d5328db73
@ -10,7 +10,7 @@ type BuilderProps = {
|
||||
valueName: string;
|
||||
};
|
||||
|
||||
export default function buildAction<T>(
|
||||
export function buildAction<T>(
|
||||
Component: ComponentType<T>,
|
||||
{ elementName, valueName: processName }: BuilderProps
|
||||
) {
|
||||
|
||||
@ -10,7 +10,7 @@ export type BuilderProps = {
|
||||
valueName: Values;
|
||||
};
|
||||
|
||||
export default function buildLink<T>(
|
||||
export function buildLink<T>(
|
||||
Component: ComponentType<T>,
|
||||
{ elementName, valueName }: BuilderProps
|
||||
) {
|
||||
|
||||
@ -13,7 +13,7 @@ type BuilderProps = {
|
||||
valueName: Values;
|
||||
};
|
||||
|
||||
export default function buildOptions<T>(
|
||||
export function buildOptions<T>(
|
||||
Component: ComponentType<T>,
|
||||
{ elementName, valueName }: BuilderProps
|
||||
) {
|
||||
|
||||
@ -10,7 +10,7 @@ type BuilderProps = {
|
||||
valueName: Values;
|
||||
};
|
||||
|
||||
export default function buildReadonly<T>(
|
||||
export function buildReadonly<T>(
|
||||
Component: ComponentType<T>,
|
||||
{ elementName, valueName }: BuilderProps
|
||||
) {
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
export { default as buildAction } from './build-action';
|
||||
export * from './build-check';
|
||||
export { default as buildLink } from './build-link';
|
||||
export { default as buildOptions } from './build-options';
|
||||
export { default as buildReadonly } from './build-readonly';
|
||||
export * from './build-switch';
|
||||
export * from './build-value';
|
||||
7
apps/web/Components/Calculation/builders/index.ts
Normal file
7
apps/web/Components/Calculation/builders/index.ts
Normal file
@ -0,0 +1,7 @@
|
||||
export * from './build-action';
|
||||
export * from './build-check';
|
||||
export * from './build-link';
|
||||
export * from './build-options';
|
||||
export * from './build-readonly';
|
||||
export * from './build-switch';
|
||||
export * from './build-value';
|
||||
@ -14,7 +14,7 @@ import { QueryClientProvider } from '@tanstack/react-query';
|
||||
import Head from 'next/head';
|
||||
import { useMemo } from 'react';
|
||||
import { ThemeProvider } from 'styled-components';
|
||||
import AntdConfig from 'ui/elements/Config';
|
||||
import { Config as AntdConfig } from 'ui/elements/Config';
|
||||
|
||||
// eslint-disable-next-line turbo/no-undeclared-env-vars
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
import { ConfigProvider } from 'antd';
|
||||
import ru_RU from 'antd/lib/locale/ru_RU';
|
||||
|
||||
function AntdConfig({ children }) {
|
||||
export function Config({ children }) {
|
||||
return <ConfigProvider locale={ru_RU}>{children}</ConfigProvider>;
|
||||
}
|
||||
|
||||
export default AntdConfig;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import type { ButtonProps } from 'antd';
|
||||
import { Button as AntButton } from 'antd';
|
||||
|
||||
export default function Link({ href, ...props }: ButtonProps) {
|
||||
export function Link({ href, ...props }: ButtonProps) {
|
||||
return (
|
||||
<AntButton
|
||||
rel="noopener"
|
||||
|
||||
@ -9,13 +9,7 @@ type RadioProps = Omit<RadioGroupProps, 'onChange' | 'options'> & {
|
||||
spaceProps?: SpaceProps;
|
||||
};
|
||||
|
||||
export default function Radio({
|
||||
value = null,
|
||||
options,
|
||||
spaceProps,
|
||||
onChange,
|
||||
...props
|
||||
}: RadioProps) {
|
||||
export function Radio({ value = null, options, spaceProps, onChange, ...props }: RadioProps) {
|
||||
function handleChange(event: RadioChangeEvent) {
|
||||
if (onChange) onChange(event.target.value);
|
||||
}
|
||||
|
||||
@ -5,6 +5,6 @@ type ElementProps = Omit<SegmentedProps, 'options' | 'ref'> & {
|
||||
options?: SegmentedProps['options'];
|
||||
};
|
||||
|
||||
export default function Segmented({ options = [], ...props }: ElementProps) {
|
||||
export function Segmented({ options = [], ...props }: ElementProps) {
|
||||
return <AntSegmented {...props} options={options} />;
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@ import type { SelectProps } from 'antd';
|
||||
import { Select as AntSelect } from 'antd';
|
||||
import { useMemo } from 'react';
|
||||
|
||||
export default function Select({ options = [], ...props }: SelectProps<string | null>) {
|
||||
export function Select({ options = [], ...props }: SelectProps<string | null>) {
|
||||
const optionsWithNull = useMemo(
|
||||
() => [
|
||||
{
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { Typography } from 'antd';
|
||||
import type { ComponentProps, ReactNode } from 'react';
|
||||
|
||||
export default function Text({
|
||||
export function Text({
|
||||
value = '',
|
||||
...props
|
||||
}: ComponentProps<(typeof Typography)['Text']> & { value?: ReactNode }) {
|
||||
|
||||
@ -11,14 +11,14 @@ notification.config({
|
||||
|
||||
export * from './Button';
|
||||
export * from './Checkbox';
|
||||
export { default as AntdConfig } from './Config';
|
||||
export * from './Config';
|
||||
export * from './Input';
|
||||
export { default as Link } from './Link';
|
||||
export { default as Radio } from './Radio';
|
||||
export { default as Segmented } from './Segmented';
|
||||
export { default as Select } from './Select';
|
||||
export * from './Link';
|
||||
export * from './Radio';
|
||||
export * from './Segmented';
|
||||
export * from './Select';
|
||||
export * from './Switch';
|
||||
export { default as Text } from './Text';
|
||||
export * from './Text';
|
||||
export {
|
||||
Alert,
|
||||
Badge,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user