Skip to content

Commit

Permalink
fix: Updated readme (#6)
Browse files Browse the repository at this point in the history
- Added Setup Guide to Readme
- Added Screenshots to Readme
  • Loading branch information
Dulajdeshan authored Oct 25, 2023
1 parent f28c901 commit a620609
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 12 deletions.
28 changes: 26 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
<p align="center">
<a href="https://www.npmjs.com/package/strapi-bootstrap-icons">
<img src="https://img.shields.io/npm/v/strapi-bootstrap-icons" alt="Version">
<img src="https://img.shields.io/npm/l/strapi-bootstrap-icons
" alt="License">
<img src="https://img.shields.io/npm/l/strapi-bootstrap-icons" alt="License">
</a>
</p>

Expand All @@ -29,5 +28,30 @@ npm install strapi-bootstrap-icons
yarn add strapi-bootstrap-icons
```

## Setup

After installation you will find the `Bootstrap Icon` at the custom fields section of the content-type builder.

![strapi bootstrap icons](./screenshot/screenshot-1.png)

Now you can define the field attributes. `Bootstrap Icon` field allows you to select a response type for the field value in 3 formats.

- Base64
- SVG
- CSS Class

![strapi bootstrap icons](./screenshot/screenshot-2.png)

Now You can create new records via the Admin panel with selecting your preferred bootstrap icons.

![strapi bootstrap icons](./screenshot/screenshot-3.png)


![strapi bootstrap icons](./screenshot/screenshot-4.png)

## Demo

![strapi bootstrap icons demo](./screenshot/demo.gif)

## License
This plugin is licensed under the MIT License. See the LICENSE file for more information.
6 changes: 3 additions & 3 deletions admin/src/components/Input/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ const Input = ({
disabled={disabled}
startAction={
<FieldActionWrapper onClick={toggleModal}>
<i className={`bi bi-${value}`}></i>
<Typography className={`bi bi-${value}`}></Typography>
</FieldActionWrapper>
}
endAction={
Expand Down Expand Up @@ -176,10 +176,10 @@ const Input = ({
style={{ width: "inherit", height: "inherit" }}
onClick={() => handleClickIcon(item)}
>
<i
<Typography
className={`icon bi-${item}`}
style={{ fontSize: 24 }}
></i>
></Typography>
</IconButton>
</Tooltip>
))}
Expand Down
4 changes: 0 additions & 4 deletions admin/src/components/ThumbIcon/icon.svg

This file was deleted.

5 changes: 3 additions & 2 deletions admin/src/components/ThumbIcon/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
*/

import React from "react";
import icon from "./icon.svg";
import { Typography } from '@strapi/design-system';
import 'bootstrap-icons/font/bootstrap-icons.css'

const ThumbIcon = () => <img alt={"bootstrap icons"} src={icon} />;
const ThumbIcon = () => <Typography className="bi bi-bootstrap"></Typography>

export default ThumbIcon;
3 changes: 2 additions & 1 deletion admin/src/pages/HomePage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
Tooltip,
SearchForm,
Searchbar,
Typography
} from "@strapi/design-system";
import { useIntl } from "react-intl";
import pluginId from "../../pluginId";
Expand Down Expand Up @@ -85,7 +86,7 @@ const HomePage = () => {
aria-label="Edit"
style={{ width: "inherit", height: "inherit" }}
>
<i className={`icon bi-${item}`} style={{ fontSize: 24 }}></i>
<Typography className={`icon bi-${item}`} style={{ fontSize: 24 }}></Typography>
</IconButton>
</Tooltip>
))}
Expand Down
Binary file added screenshot/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshot/screenshot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshot/screenshot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshot/screenshot-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshot/screenshot-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a620609

Please sign in to comment.