Skip to content

Commit

Permalink
docs correcting
Browse files Browse the repository at this point in the history
  • Loading branch information
phgrey committed Jan 2, 2024
1 parent 887fd44 commit e535678
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions docs/principes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,21 @@

## Few words about our headless

As soon as we're using few techologies, we need to use headless approach. In general it also gives us a lot of flexibility. Not for free, but by increasing complexity.
As soon as we're using few techologies, we need to use headless approach, so sub-components structure & interactions are mostly predefined.

## Components composition

... in general it gives us a lot of flexibility. Not for free, but by increasing complexity.

What does it mean e.g. on form-field level:

1. Full syntax
```
<Field>
<Field.Label/>
<Field.Label>Label here</Field.Label>
<Form.Input/>
<Field.Hint/>
<Field.Error>
<Field.Hint>hint here</Field.Hint>
<Field.Error/>
</Field>
```
This variant is fully customizable - elements sequence, presence, replacement, visual changes, icons in text and so on
Expand All @@ -21,7 +25,7 @@ This variant is fully customizable - elements sequence, presence, replacement, v

2. Short syntax
```
<Field label="..." hint="..." hide_errors>
<Field label="Label here" hint="hint here" hide_errors>
<Form.Input/>
</Field>
```
Expand All @@ -30,7 +34,7 @@ This code looks easier to read, but it's less flexible - no classes, icons, etc.

3. Extra-short (only in components v1)
```
<Form.Input label="..." hint="...">
<Form.Input label="Label here" hint="hint here">
```

Code is not flexible, and also - u can take an `<input>` only together wuth lot of other unecessary things, so it can be used only inside the form. we will need a separate input for other cases or realy dirty code inside (take a look at components v1)
Code is not flexible, How would you customize the label or email here? And also - u can take an `<input>` only together wuth lot of other unecessary things, so it can be used only inside the form. we will need a separate input for other cases or realy dirty code inside (take a look at form components v1)

0 comments on commit e535678

Please sign in to comment.