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

Arguments for properties #5

Closed
rowanc1 opened this issue Apr 15, 2020 · 0 comments
Closed

Arguments for properties #5

rowanc1 opened this issue Apr 15, 2020 · 0 comments

Comments

@rowanc1
Copy link
Member

rowanc1 commented Apr 15, 2020

transform, for example, takes an argument scoped within the component.

export const InkRangeSpec = {
  name: 'range',
  description: 'Range input',
  properties: {
    value: { type: types.PropTypes.number, default: 0 },
    min: { type: types.PropTypes.number, default: 0 },
    max: { type: types.PropTypes.number, default: 100 },
    step: { type: types.PropTypes.number, default: 1 },
    transform: {type: types.PropTypes.string, default: '', args: ['value'], has:{func: true, value: false}}
  },
  events: {
    change: { args: ['value'] },
  },
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant