PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 4.9.5
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v4.9.5
4.9.5 4.9.4 4.9.3 4.9.2 4.9.1 4.9.0 4.8.2 4.8.1 4.8.0 4.7.0 4.6.2 4.6.1 4.6.0 4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 4.5.1 4.5.0 4.4.1 4.4.0 3.3.4 3.4.0 3.4.1 All 203 releases
betterdocs / react-src / gutenberg / components / partials / Button.js

Button.js in BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot 4.9.5, at react-src/gutenberg/components/partials/Button.js

23 lines 812 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import react from 'react';
2 import { __ } from '@wordpress/i18n';
3
4
5 const ButtonIcon = ({ icon, position }) => {
6 const newPosition = position == 'before' ? 'left' : 'right';
7 return (
8 <i className={`${icon} betterdocs-category-link-btn betterdocs-category-link-btn-${newPosition}`}></i>
9 )
10 }
11
12 const Button = ({ label, permalink, showIcon, position, icon }) => {
13 return (
14 <a onClick={(e) => e.preventDefault()} className="docs-cat-link-btn betterdocs-category-link-btn" href={permalink}>
15 {showIcon && position === 'before' && <ButtonIcon icon={icon} position={position} />}
16 {label ?? __('Explore More', 'betterdocs')}
17 {showIcon && position === 'after' && <ButtonIcon icon={icon} position={position} />}
18 </a>
19 )
20 }
21
22 export default Button;
23