kit

Rating

Built revision v17.10.0

React
Topics

Human support

Bring a missing role, layout, or state, or a rendering against the standard, to the session working on kit. Name the package and the entry.

Rating

4.5 from 38 reviews

4.5 من 38 مراجعة

How was the hall?
4 starsOther hirers see your rating on the hall's page.

Your rating while bookings cannot be changed.

How was the hall?
4 stars
How helpful was the caretaker?
Not rated
Source
let stars = ("1 star", "2 stars", "3 stars", "4 stars", "5 stars")
let score = KitReact.Amount.score(Specimen_Reader.reader, ~amount="4.5", ~decimals=1)

@react.component
let make = () => {
  <>
    <KitReact.Roles.Rating.Shown
      score
      words=[
        KitReact.Words.Amount(score),
        KitReact.Words.Text(" from "),
        KitReact.Words.Amount(KitReact.Amount.count(Specimen_Reader.reader, 38)),
        KitReact.Words.Text(" reviews"),
      ]
      spoken=[
        KitReact.Words.Amount(score),
        KitReact.Words.Text(" out of "),
        KitReact.Words.Amount(KitReact.Amount.count(Specimen_Reader.reader, 5)),
        KitReact.Words.Text(", from "),
        KitReact.Words.Amount(KitReact.Amount.count(Specimen_Reader.reader, 38)),
        KitReact.Words.Text(" reviews"),
      ]
    />
    <p dir="rtl" lang="ar">
      <KitReact.Roles.Rating.Shown
        score
        words=[
          KitReact.Words.Amount(score),
          KitReact.Words.Text(" من "),
          KitReact.Words.Amount(KitReact.Amount.count(Specimen_Reader.reader, 38)),
          KitReact.Words.Text(" مراجعة"),
        ]
        spoken=[
          KitReact.Words.Amount(score),
          KitReact.Words.Text(" من "),
          KitReact.Words.Amount(KitReact.Amount.count(Specimen_Reader.reader, 5)),
          KitReact.Words.Text("، من "),
          KitReact.Words.Amount(KitReact.Amount.count(Specimen_Reader.reader, 38)),
          KitReact.Words.Text(" مراجعة"),
        ]
      />
    </p>
    <KitReact.Roles.FormGroup
      id="react-rating-hall" printedValue={React.string("4 stars")}
      label={React.string("How was the hall?")}
      help={React.string("Other hirers see your rating on the hall's page.")}
      kind={KitReact.Roles.Rating.controlSet({name: "hall", value: 4, stars, clear: true})}
    />
    <p className="specimen-case-line"> {React.string("Your rating while bookings cannot be changed.")} </p>
    <KitReact.Roles.FormGroup
      id="react-rating-hall-disabled" printedValue={React.string("4 stars")}
      label={React.string("How was the hall?")}
      kind={KitReact.Roles.Rating.controlSet({name: "hall-disabled", value: 4, stars, clear: true, disabled: true})}
    />
    <KitReact.Roles.FormGroup
      id="react-rating-caretaker" printedValue={React.string("Not rated")}
      label={React.string("How helpful was the caretaker?")}
      kind={KitReact.Roles.Rating.controlSet({name: "caretaker", stars})}
    />
  </>
}