Skip to content

How can I get common props from rSuiteComponents? #57

Discussion options

You must be logged in to vote

@tuthanhoancanh012

What is your issue with common properties? If you provide the correct definition, it should work. Below is an example of how it is implemented internally for some components.

export const inputProps = {
  placeholder: string.hinted('Input placeholder'),
  size,
  disabled: boolean.hinted('Disabled component').default(false),
  readOnly,
  onChange: event,
}

export const rsInput = define(RsInput, 'RsInput')
  .name('Input')
  .props({
    label: string.default('Input').hinted('Input label'),
    ...inputProps,
    type: oneOf('text', 'password', 'email', 'number', 'search', 'tel', 'url', 'time').default('text'),
    value: string.valued,
    passwordMask: boolean.default(

Replies: 3 comments 8 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by sergeythrees
Comment options

You must be logged in to vote
8 replies
@cherepanov
Comment options

@tuthanhoancanh012
Comment options

@cherepanov
Comment options

@tuthanhoancanh012
Comment options

@tuthanhoancanh012
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants