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: query item text props #325

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from 4 commits
Commits
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
14 changes: 8 additions & 6 deletions src/components/data-entry/QueryItem/Text.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import { type TextProps } from 'antd/es/typography/Text'
import { Typography } from 'src/components/general/Typography/Typography'

export interface ITextProps {
export interface ITextProps extends TextProps {
disabled?: boolean
text: string
type?: TextProps['type']
children: TextProps['children']
}

const Text = ({ disabled = false, text }: ITextProps) => {
const Text = ({ disabled = false, ...props }: ITextProps) => {
return (
<Typography.Text disabled={disabled} style={{ whiteSpace: 'nowrap' }}>
{text}
<Typography.Text disabled={disabled} type={props.type} style={{ whiteSpace: 'nowrap' }}>
{props.children}
</Typography.Text>
)
}

export default Text
export default Text
Loading