diff --git a/docs/api/config/booking-cardshape.md b/docs/api/config/booking-cardshape.md index 828b821..fc93a34 100644 --- a/docs/api/config/booking-cardshape.md +++ b/docs/api/config/booking-cardshape.md @@ -26,9 +26,9 @@ cardShape?: { ### Parameters -In the **cardShape** object you can specify the following parameters (fields): +In the `cardShape` object you can specify the following parameters (fields): -- `category` - (optional) shows/hides a card's name +- `category` - (optional) shows/hides a category name - `details` - (optional) shows/hides details - `preview` - (optional) shows/hides a preview image - `price` - (optional) shows/hides price @@ -45,7 +45,7 @@ const defaultCardShape = { preview: true, price: true, review: true, - subtitle: false, + subtitle: true, title: true }; ~~~ @@ -70,10 +70,10 @@ The snippet below demonstrates how to configure what fields to display on the le :::info -You can also configure the appearance of a card using the [`cardTemplate`](/api/config/booking-cardtemplate) property. If both `cardTemplate` and `cardShape` are applied, `cardTemplate` will override the `cardShape` settings. +You can also configure the appearance of a card using the [`cardTemplate`](api/config/booking-cardtemplate.md) property. If both `cardTemplate` and `cardShape` are applied, `cardTemplate` will override the `cardShape` settings. ::: -**Related articles:** +**Related articles**: -- [Defining the structure of cards](/guides/configuration/#defining-the-structure-of-cards) -- [`cardTemplate`](/api/config/booking-cardtemplate) \ No newline at end of file +- [Defining the structure of cards](guides/configuration.md#define-the-structure-of-cards) +- [`cardTemplate`](api/config/booking-cardtemplate.md) \ No newline at end of file diff --git a/docs/api/config/booking-cardtemplate.md b/docs/api/config/booking-cardtemplate.md index 69c33e9..ec56943 100644 --- a/docs/api/config/booking-cardtemplate.md +++ b/docs/api/config/booking-cardtemplate.md @@ -13,7 +13,7 @@ description: You can learn about the cardTemplate config in the documentation of The property specifies the HTML structure and layout of each card's block (the left side of each card). It means you can manage which fields are displayed, how they are arranged, and how they look. :::info -You can also specify which fields to display using the [`cardShape`](/api/config/booking-cardshape) property +You can also specify which fields to display using the [`cardShape`](api/config/booking-cardshape.md) property ::: ### Usage @@ -24,11 +24,11 @@ cardTemplate?: ({item: obj}) => string; ### Parameters -`cardTemplate` expects a function that takes a `card` object as input and returns a string of HTML that defines how the card should look. +`cardTemplate` expects a function that takes an `item` (card) object as input and returns a string of HTML that defines how the card should look. ### Example -In the example below we create a function that takes the `card` object and returns HTML for a card that includes a preview image (card.preview), category (card.category), title (card.title), and price (card.price). You need to create your own HTML template to be applied to a card and import the **template** helper. Then pass the function into the Booking configuration by assigning the function to the `cardTemplate` property. +In the example below we create a function that takes the `item` (card) object and returns HTML for a card that includes a preview image (item.preview), category (item.category), title (item.title), and price (item.price). You need to create your own HTML template to be applied to a card and import the `template` helper. Then pass the function into the Booking configuration by assigning the function to the `cardTemplate` property. ~~~html {} ~~~ -## Custom styles +## Apply custom styles + +To match your project design, scope the CSS variables under a custom class on the Booking container. -To customize the appearance of Booking to your project needs, you need to apply the corresponding CSS variables. +The following code snippet defines a custom palette for the `.demo` container: ~~~html
@@ -83,7 +96,7 @@ To customize the appearance of Booking to your project needs, you need to apply ~~~ -The next example shows how to change the background color for cards: +The following code snippet changes the background color of cards and the date items: ~~~html