瀏覽代碼

Update components

Update email input autocomplete, multiline text input rows, and link button types.
master
TheoryOfNekomata 7 月之前
父節點
當前提交
2503a64cbc
共有 6 個檔案被更改,包括 10 行新增24 行删除
  1. +1
    -1
      categories/web/formatted/react/package.json
  2. +1
    -1
      categories/web/formatted/react/src/components/EmailInput/index.tsx
  3. +1
    -1
      categories/web/freeform/react/package.json
  4. +3
    -1
      categories/web/freeform/react/src/components/MultilineTextInput/index.tsx
  5. +1
    -1
      categories/web/navigation/react/package.json
  6. +3
    -19
      categories/web/navigation/react/src/components/LinkButton/index.tsx

+ 1
- 1
categories/web/formatted/react/package.json 查看文件

@@ -1,6 +1,6 @@
{
"name": "@tesseract-design/web-formatted-react",
"version": "0.2.0",
"version": "0.2.1",
"files": [
"dist",
"src"


+ 1
- 1
categories/web/formatted/react/src/components/EmailInput/index.tsx 查看文件

@@ -137,7 +137,7 @@ export const EmailInput = React.forwardRef<EmailInputDerivedElement, EmailInputP
aria-labelledby={labelId}
type="email"
data-testid="input"
autoComplete={autoComplete ? 'email' : undefined}
autoComplete={autoComplete ? 'email' : 'off'}
pattern={pattern}
className={tw(
'bg-negative rounded-inherit w-full peer block font-inherit tabular-nums',


+ 1
- 1
categories/web/freeform/react/package.json 查看文件

@@ -1,6 +1,6 @@
{
"name": "@tesseract-design/web-freeform-react",
"version": "0.2.0",
"version": "0.2.1",
"files": [
"dist",
"src"


+ 3
- 1
categories/web/freeform/react/src/components/MultilineTextInput/index.tsx 查看文件

@@ -71,6 +71,7 @@ export const MultilineTextInput = React.forwardRef<
hiddenLabel = false,
className,
style,
rows,
id: idProp,
...etcProps
}: MultilineTextInputProps,
@@ -127,9 +128,10 @@ export const MultilineTextInput = React.forwardRef<
aria-labelledby={labelId}
id={id}
data-testid="input"
style={{
style={Number.isFinite(rows) ? undefined : {
height: 0,
}}
rows={rows}
className={tw(
'bg-negative rounded-inherit w-full peer block font-inherit',
'focus:outline-0',


+ 1
- 1
categories/web/navigation/react/package.json 查看文件

@@ -1,6 +1,6 @@
{
"name": "@tesseract-design/web-navigation-react",
"version": "0.2.0",
"version": "0.2.1",
"files": [
"dist",
"src"


+ 3
- 19
categories/web/navigation/react/src/components/LinkButton/index.tsx 查看文件

@@ -59,15 +59,15 @@ interface LinkButtonAnchorProps extends Pick<React.HTMLProps<LinkButtonDerivedEl
component: typeof LinkButtonDerivedElementComponent;
}

interface LinkButtonComponentType {
(props: { href?: string }): React.ReactNode;
export interface LinkButtonComponentType {
(props: { href: string }): React.ReactNode;
}

interface LinkButtonFCProps<
C extends LinkButtonComponentType = LinkButtonComponentType
> {
component: C;
href: C extends (props: { href?: infer Href }) => React.ReactNode ? Href : never;
href: C extends (props: { href: infer Href }) => React.ReactNode ? Href : never;
}

type LinkButtonAllProps<
@@ -262,19 +262,3 @@ LinkButton.defaultProps = {
// eslint-disable-next-line react/default-props-match-prop-types
href: undefined,
};

// extend the component type here for defining new props
// interface LinkButtonComponentType {
// (props: { href?: number }): React.ReactNode;
// }

// const CustomLink = (props: { href?: string | number }) => {
// return null;
// };
//
// const a = (
// <LinkButton
// component="a"
// href="string"
// />
// );

Loading…
取消
儲存