Giter Club home page Giter Club logo

axiscontribution's Introduction

AxisContribution for SwiftUI

A library that expresses a github contribution calendar through an array of dates. Supports iOS and macOS.

Platforms iOS macOS instagram SPM MIT

Screenshot

Horizontal Vertical
2022-02-23.10.14.31.mov

Example

https://fabulaapp.page.link/231

Usages

/// Initializes `ACConstant`
/// - Parameters:
///   - fromDate: The start date to display the list of contributions. The default value is `1 year from today.`.
///   - toDate: The end date to display the list of contributions. The default value is `today`.
///   - spacing: The spacing in the row view showing the list of contributions. The default value is `4`.
///   - levelSpacing: A number that separates units between contribution levels. The default value is `3`.
///   - axisMode: The axis mode of the component. The default value is `.horizontal`.
///   - font: The font used for text. The default value is `.system(size: 9)`.

AxisContribution(constant: .init(), source: [Date(), Date()])
// or
AxisContribution(constant: .init(), source: [Date(), Date()]) { indexSet, data in
    Image(systemName: "heart.fill")
      .foregroundColor(Color(hex: colorScheme == .dark ? 0x171B21 : 0xF0F0F0))
      .font(.system(size: rowSize))
      .frame(width: rowSize, height: rowSize)
} foreground: { indexSet, data in
    Image(systemName: "heart.fill")
      .foregroundColor(Color(hex: 0x6CD164))
      .font(.system(size: rowSize))
      .frame(width: rowSize, height: rowSize)
}

Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler. Once you have your Swift package set up, adding AxisContribution as a dependency is as easy as adding it to the dependencies value of your Package.swift.

dependencies: [
    .package(url: "https://github.com/jasudev/AxisContribution.git", .branch("main"))
]

Contact

instagram : @dev.fabula
email : [email protected]

License

AxisContribution is available under the MIT license. See the LICENSE file for more info.

axiscontribution's People

Contributors

jasudev avatar alfredcc avatar maples7 avatar moophis avatar yuntan avatar arturolee avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.