refactor: change exported types and constants to internal scope in Facehash and RicercaProvider components
This commit is contained in:
parent
9f02c49193
commit
6a101f7b68
3 changed files with 32 additions and 32 deletions
|
|
@ -4,10 +4,10 @@ import { FACES } from "./faces";
|
|||
|
||||
// from https://github.com/cossistantcom/cossistant/tree/main/packages/facehash
|
||||
|
||||
export type Intensity3D = "none" | "subtle" | "medium" | "dramatic";
|
||||
export type Variant = "gradient" | "solid";
|
||||
type Intensity3D = "none" | "subtle" | "medium" | "dramatic";
|
||||
type Variant = "gradient" | "solid";
|
||||
|
||||
export interface FacehashProps
|
||||
interface FacehashProps
|
||||
extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
|
||||
/**
|
||||
* String to generate a deterministic face from.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import type * as React from "react";
|
||||
|
||||
export type FaceProps = {
|
||||
type FaceProps = {
|
||||
className?: string;
|
||||
style?: React.CSSProperties;
|
||||
};
|
||||
|
|
@ -8,7 +8,7 @@ export type FaceProps = {
|
|||
/**
|
||||
* Round eyes face - simple circular eyes
|
||||
*/
|
||||
export const RoundFace: React.FC<FaceProps> = ({ className, style }) => (
|
||||
const RoundFace: React.FC<FaceProps> = ({ className, style }) => (
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
className={className}
|
||||
|
|
@ -32,7 +32,7 @@ export const RoundFace: React.FC<FaceProps> = ({ className, style }) => (
|
|||
/**
|
||||
* Cross eyes face - X-shaped eyes
|
||||
*/
|
||||
export const CrossFace: React.FC<FaceProps> = ({ className, style }) => (
|
||||
const CrossFace: React.FC<FaceProps> = ({ className, style }) => (
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
className={className}
|
||||
|
|
@ -56,7 +56,7 @@ export const CrossFace: React.FC<FaceProps> = ({ className, style }) => (
|
|||
/**
|
||||
* Line eyes face - horizontal line eyes
|
||||
*/
|
||||
export const LineFace: React.FC<FaceProps> = ({ className, style }) => (
|
||||
const LineFace: React.FC<FaceProps> = ({ className, style }) => (
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
className={className}
|
||||
|
|
@ -88,7 +88,7 @@ export const LineFace: React.FC<FaceProps> = ({ className, style }) => (
|
|||
/**
|
||||
* Curved eyes face - sleepy/happy curved eyes
|
||||
*/
|
||||
export const CurvedFace: React.FC<FaceProps> = ({ className, style }) => (
|
||||
const CurvedFace: React.FC<FaceProps> = ({ className, style }) => (
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
className={className}
|
||||
|
|
@ -112,7 +112,7 @@ export const CurvedFace: React.FC<FaceProps> = ({ className, style }) => (
|
|||
/**
|
||||
* Square eyes face - robot/neutral style
|
||||
*/
|
||||
export const SquareFace: React.FC<FaceProps> = ({ className, style }) => (
|
||||
const SquareFace: React.FC<FaceProps> = ({ className, style }) => (
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
className={className}
|
||||
|
|
@ -130,33 +130,33 @@ export const SquareFace: React.FC<FaceProps> = ({ className, style }) => (
|
|||
/**
|
||||
* Star eyes face - excited/dazzled
|
||||
*/
|
||||
export const StarFace: React.FC<FaceProps> = ({ className, style }) => (
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
className={className}
|
||||
fill="none"
|
||||
style={style}
|
||||
viewBox="-3 -3 69 21"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<title>Star Eyes</title>
|
||||
<path
|
||||
d="M7.2 0L9.1 5.3H14.4L10.2 8.6L11.8 14.4L7.2 11.2L2.6 14.4L4.2 8.6L0 5.3H5.3L7.2 0Z"
|
||||
fill="currentColor"
|
||||
transform="translate(7.2 7.2) scale(1.3) translate(-7.2 -7.2)"
|
||||
/>
|
||||
<path
|
||||
d="M55.2 0L57.1 5.3H62.4L58.2 8.6L59.8 14.4L55.2 11.2L50.6 14.4L52.2 8.6L48 5.3H53.3L55.2 0Z"
|
||||
fill="currentColor"
|
||||
transform="translate(55.2 7.2) scale(1.3) translate(-55.2 -7.2)"
|
||||
/>
|
||||
</svg>
|
||||
const StarFace: React.FC<FaceProps> = ({ className, style }) => (
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
className={className}
|
||||
fill="none"
|
||||
style={style}
|
||||
viewBox="-3 -3 69 21"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<title>Star Eyes</title>
|
||||
<path
|
||||
d="M7.2 0L9.1 5.3H14.4L10.2 8.6L11.8 14.4L7.2 11.2L2.6 14.4L4.2 8.6L0 5.3H5.3L7.2 0Z"
|
||||
fill="currentColor"
|
||||
transform="translate(7.2 7.2) scale(1.3) translate(-7.2 -7.2)"
|
||||
/>
|
||||
<path
|
||||
d="M55.2 0L57.1 5.3H62.4L58.2 8.6L59.8 14.4L55.2 11.2L50.6 14.4L52.2 8.6L48 5.3H53.3L55.2 0Z"
|
||||
fill="currentColor"
|
||||
transform="translate(55.2 7.2) scale(1.3) translate(-55.2 -7.2)"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
|
||||
/**
|
||||
* Wink face - one round eye, one closed
|
||||
*/
|
||||
export const WinkFace: React.FC<FaceProps> = ({ className, style }) => (
|
||||
const WinkFace: React.FC<FaceProps> = ({ className, style }) => (
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
className={className}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ type RicercaUrlParams = {
|
|||
sort: SortTypes;
|
||||
};
|
||||
|
||||
export const paramsMapping = {
|
||||
const paramsMapping = {
|
||||
map: "map",
|
||||
tipo: "tipo",
|
||||
comune: "comune",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue