Skip to content

Commit

Permalink
Feature/quick search style (#116)
Browse files Browse the repository at this point in the history
* feat: search menu styles

* feat: search menu styles
  • Loading branch information
danilolutz authored Jan 13, 2022
1 parent bffa063 commit 5cd16ef
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/app/components/RoundedButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const RoundedButton: React.FC<RoundedButtonProps> = ({
}) => {
return (
<Container className={color} style={buttonStyle} {...rest}>
{<Icon size={20} />}
{<Icon size={16} />}
</Container>
);
};
Expand Down
8 changes: 5 additions & 3 deletions src/app/components/RoundedButton/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { shade } from 'polished';
import styled from 'styled-components';

export const Container = styled.button`
background: #D7D7DD;
background: transparent;
color: ${props => props.theme.colors.text};
border-radius: 100%;
border: 0;
font-weight: 500;
Expand All @@ -13,8 +14,9 @@ export const Container = styled.button`
line-height: 18px;
color: #555;
font-weight: bold;
width: 20px;
height: 20px;
width: 25px;
height: 25px;
padding-top: 3px;
&:hover {
background: ${() => shade(0.2, '#D7D7DD')};
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/SearchMenu/MenuItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const MenuItem: React.FC<MenuItemProps> = ({
</span>
{item.iconAction && (
<RoundedButton
className={selectedItem === order ? 'primary selected' : 'primary'}
className={selectedItem === order ? 'selected' : ''}
onClick={(e: React.MouseEvent) => item.action.onClick(e)}
onKeyDown={keyPress}
tabIndex={order}
Expand Down
12 changes: 6 additions & 6 deletions src/app/util/DefaultEntities.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FaHandshake } from 'react-icons/fa';
import { FaHandshake, FaPen, FaPlus } from 'react-icons/fa';
import { IconBaseProps } from 'react-icons';
import { FiBook, FiPlus, FiSettings, FiUser } from 'react-icons/fi';
import { FiBook, FiSettings, FiUser } from 'react-icons/fi';
import i18n from '../i18n';
import { trigger } from './EventHandler';
import { AppEvent } from '../../common/AppEvent';
Expand Down Expand Up @@ -38,7 +38,7 @@ export const entities: SearchSource[] = [
label: i18n.t('borrow.label'),
icon: FaHandshake,
iconColor: '#50fa7b',
iconAction: FiPlus,
iconAction: FaPlus,
handler: {
onClick: (): void => {
trigger(AppEvent.quickSearch);
Expand All @@ -59,7 +59,7 @@ export const entities: SearchSource[] = [
label: i18n.t('person.label'),
icon: FiUser,
iconColor: '#ff78f7',
iconAction: FiPlus,
iconAction: FaPlus,
handler: {
onClick: (): void => {
trigger(AppEvent.quickSearch);
Expand All @@ -86,7 +86,7 @@ export const entities: SearchSource[] = [
label: i18n.t('title.label'),
icon: FiBook,
iconColor: '#4ad0ff',
iconAction: FiPlus,
iconAction: FaPlus,
handler: {
onClick: (): void => {
trigger(AppEvent.quickSearch);
Expand All @@ -113,7 +113,7 @@ export const entities: SearchSource[] = [
label: i18n.t('settings.label'),
icon: FiSettings,
iconColor: '#e3bb06',
iconAction: FiSettings,
iconAction: FaPen,
handler: {
onClick: (): void => {
trigger(AppEvent.quickSearch);
Expand Down

0 comments on commit 5cd16ef

Please sign in to comment.