Skip to content

Creating new customized icons #9

@jesuserro

Description

@jesuserro

This is an example for creating new icons:

import React from 'react';
import { LuCheckCircle2 } from "react-icons/lu";
import { church_icon } from './../../../assets/church.js';

interface CalendarDayProps {
  dayCounter: number;
  hasNote: string | false;
}

function CalendarDay({ dayCounter, hasNote }: CalendarDayProps) {
  let notePath = '';
  if (hasNote) {
    notePath = `obsidian://open?file=${encodeURIComponent(hasNote)}`;
  }

  return (
    <div className="day-number">
      {hasNote ? (
        <div>
          <a href={notePath}>{dayCounter}</a>
          <img className="custom-icon" src={church_icon} alt="Icon" />
          <LuCheckCircle2 size={16} />
        </div>
      ) : (
        dayCounter
      )}
    </div>
  );
}

export default CalendarDay;

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

In Progress

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions