UNPKG

@kiwicom/orbit-components

Version:

Orbit-components is a React component library which provides developers with the easiest possible way of building Kiwi.com's products.

153 lines (152 loc) 6.96 kB
"use strict"; "use client"; var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default; exports.__esModule = true; exports.default = void 0; var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); var React = _interopRequireWildcard(require("react")); var _IllustrationPrimitive = _interopRequireWildcard(require("../primitives/IllustrationPrimitive")); /** * @orbit-doc-start * README * ---------- * # Illustration * * To implement Illustration component into your project you'll need to add the import: * * ```jsx * import Illustration from "@kiwicom/orbit-components/lib/Illustration"; * ``` * * After adding import into your project you can use it simply like: * * ```jsx * <Illustration name="Accommodation" size="small" /> * ``` * * ## Props * * The table below contains all types of props available in the Illustration component. * * | Name | Type | Default | Description | * | :--------- | :------------------ | :--------------- | :--------------------------------------------------------------------------------------------------------------- | * | alt | `string` | | Optional property for passing own `alt` attribute to the DOM image element. By default, an empty string is used. | * | dataTest | `string` | | Optional prop for testing purposes. | * | id | `string` | | Set `id` for `Illustration` | * | **name** | [`enum`](#enum) | | Name for the displayed illustration. | * | size | [`enum`](#enum) | `"medium"` | The size of the Illustration. | * | spaceAfter | `enum` | | Additional `margin-bottom` after component. | * | role | `img\|presentation` | `"presentation"` | Optional property for a role attribute. | * * ### enum * * | name | size | spaceAfter | * | :------------------------------ | :------------- | :----------- | * | `"Accommodation"` | `"extraSmall"` | `"none"` | * | `"AirHelp"` | `"small"` | `"smallest"` | * | `"AirportTransport"` | `"medium"` | `"small"` | * | `"AirportTransportTaxi"` | `"large"` | `"normal"` | * | `"AirportShuttle"` | `"display"` | `"medium"` | * | `"Ambulance"` | | `"large"` | * | `"AppQRCode"` | | `"largest"` | * | `"BaggageDrop"` | * | `"Boarding"` | * | `"BoardingPass"` | * | `"BusinessTravel"` | * | `"CabinBaggage"` | * | `"CompassCollectPoints"` | * | `"CompassDemoted"` | * | `"CompassEmailAdventurer"` | * | `"CompassEmailCaptain"` | * | `"CompassEmailPromoted"` | * | `"CompassEmailPromotedCaptain"` | * | `"CompassEmailScout"` | * | `"CompassPoints"` | * | `"Chatbot"` | * | `"Cancelled"` | * | `"CompassTravelPlan"` | * | `"CompassSaveOnBooking"` | * | `"Damage"` | * | `"DepartureBoard"` | * | `"DepartureBoardBadge"` | * | `"DepartureBoardLounge"` | * | `"DesktopSearch"` | * | `"EnjoyApp"` | * | `"EVisa"` | * | `"Error"` | * | `"Error404"` | * | `"FastTrack"` | * | `"FareLock"` | * | `"FareLockSuccess"` | * | `"FastTrackMan"` | * | `"Feedback"` | * | `"FlexibleDates"` | * | `"FlightChange"` | * | `"FlightDisruptions"` | * | `"Help"` | * | `"Improve"` | * | `"Insurance"` | * | `"InviteAFriend"` | * | `"GroundTransport404"` | * | `"Login"` | * | `"Lounge"` | * | `"Mailbox"` | * | `"Meal"` | * | `"MobileApp"` | * | `"Money"` | * | `"MusicalInstruments"` | * | `"NetVerify"` | * | `"NoBookings"` | * | `"NoFavoriteFlights"` | * | `"NoFlightChange"` | * | `"Nomad"` | * | `"NomadNeutral"` | * | `"NoNotification"` | * | `"NoResults"` | * | `"Offline"` | * | `"OnlineCheckIn"` | * | `"OpenSearch"` | * | `"Parking"` | * | `"PassportUpdate"` | * | `"Pets"` | * | `"PlaceholderAirport"` | * | `"PlaceholderDestination"` | * | `"PlaceholderHotel"` | * | `"PlaceholderTours"` | * | `"PlaneAndMoney"` | * | `"PlaneDelayed"` | * | `"PriceChange"` | * | `"PriorityBoarding"` | * | `"Rating"` | * | `"ReferAFriend"` | * | `"RentalCar"` | * | `"Seating"` | * | `"SpecialAssistance"` | * | `"SportsEquipment"` | * | `"Success"` | * | `"Time"` | * | `"TicketFlexi"` | * | `"TimelineBoarding"` | * | `"TimelineDropBaggage"` | * | `"TimelineLeave"` | * | `"TimelinePick"` | * | `"Tours"` | * | `"Train"` | * | `"TransportBus"` | * | `"TransportTaxi"` | * | `"Wheelchair"` | * | `"WomanWithPhone"` | * * * @orbit-doc-end */ const Illustration = ({ size = _IllustrationPrimitive.SIZE_OPTIONS.MEDIUM, role = "presentation", ...props }) => /*#__PURE__*/React.createElement(_IllustrationPrimitive.default, (0, _extends2.default)({}, props, { size: size, role: role })); var _default = exports.default = Illustration;